]> git.pld-linux.org Git - packages/python-tlslite.git/blob - python-tlslite.spec
rebuild with python 3.10
[packages/python-tlslite.git] / python-tlslite.spec
1 #
2 # Conditional build:
3 %bcond_without  python2 # CPython 2.x module
4 %bcond_without  python3 # CPython 3.x module
5
6 %define module          tlslite
7 %define egg_name        tlslite
8 Summary:        Open source Python library that implements SSL and TLS
9 Name:           python-%{module}
10 Version:        0.4.9
11 Release:        5
12 License:        BSD
13 Group:          Libraries/Python
14 Source0:        https://pypi.python.org/packages/source/t/%{module}/%{module}-%{version}.tar.gz
15 # Source0-md5:  9f3b3797f595dd66cd36a65c83a87869
16 URL:            http://trevp.net/tlslite
17 BuildRequires:  rpm-pythonprov
18 BuildRequires:  rpmbuild(macros) >= 1.714
19 %if %{with python2}
20 BuildRequires:  python-modules >= 1:2.6
21 BuildRequires:  python-setuptools
22 %endif
23 %if %{with python3}
24 BuildRequires:  python3-modules >= 1:3.2
25 BuildRequires:  python3-setuptools
26 %endif
27 BuildArch:      noarch
28 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
29
30 %description
31 TLS Lite is an open source Python library that implements SSL and TLS.
32 TLS Lite supports RSA and SRP cipher suites. TLS Lite is pure Python,
33 however it can use other libraries for faster crypto operations. TLS
34 Lite integrates with several stdlib networking libraries.
35
36 %package -n python3-%{module}
37 Summary:        Open source Python library that implements SSL and TLS
38 Group:          Libraries/Python
39
40 %description -n python3-%{module}
41 TLS Lite is an open source Python library that implements SSL and TLS.
42 TLS Lite supports RSA and SRP cipher suites. TLS Lite is pure Python,
43 however it can use other libraries for faster crypto operations. TLS
44 Lite integrates with several stdlib networking libraries.
45
46 %prep
47 %setup -q -n %{module}-%{version}
48
49 chmod a-x README
50
51 # and remove their executable permission so that they don't drag in more
52 # dependencies, and lint doesn't throw a warning
53 chmod -x scripts/tls*.py
54
55 %build
56 %if %{with python2}
57 %py_build
58 %endif
59 %if %{with python3}
60 %py3_build
61 %endif
62
63 %install
64 rm -rf $RPM_BUILD_ROOT
65 %if %{with python2}
66 %py_install
67 %py_postclean
68 %endif
69 %if %{with python2}
70 %py3_install
71 %endif
72
73 # scripts are of limited usefulness, put them only in docs
74 rm $RPM_BUILD_ROOT%{_bindir}/tls*.py
75
76 %clean
77 rm -rf $RPM_BUILD_ROOT
78
79 %if %{with python2}
80 %files
81 %defattr(644,root,root,755)
82 %doc README LICENSE scripts/tls*.py
83 %{py_sitescriptdir}/%{module}
84 %{py_sitescriptdir}/%{egg_name}-%{version}-py*.egg-info
85 %endif
86
87 %if %{with python3}
88 %files -n python3-%{module}
89 %defattr(644,root,root,755)
90 %doc README LICENSE scripts/tls*.py
91 %{py3_sitescriptdir}/%{module}
92 %{py3_sitescriptdir}/%{egg_name}-%{version}-py*.egg-info
93 %endif
This page took 0.071069 seconds and 3 git commands to generate.