Overview
Request 1706 (accepted)
Submit python-pybeam
- Created by vanmeeuwen almost 9 years ago
- In state accepted
python-pybeam.spec
Added
x
1
2
+%global realname pybeam
3
+%global upstream matwey
4
+%global debug_package %{nil}
5
+
6
+%if 0%{?rhel}
7
+%global with_python3 0
8
+%endif
9
+
10
+%{!?python2_sitelib: %define python2_sitelib %{python_sitelib}}
11
+
12
+Name: python-%{realname}
13
+Version: 0.3.2
14
+Release: 1%{?dist}
15
+Summary: Python module to parse Erlang BEAM files
16
+License: MIT
17
+Group: Development/Languages
18
+URL: https://github.com/%{upstream}/%{realname}
19
+%if 0%{?el7}%{?fedora}
20
+VCS: scm:git:https://github.com/%{upstream}/%{realname}.git
21
+%endif
22
+Source0: https://github.com/%{upstream}/%{realname}/archive/%{version}/%{realname}-%{version}.tar.gz
23
+
24
+Patch1: pybeam-0.3.2-python26.patch
25
+
26
+BuildArch: noarch
27
+
28
+
29
+%description
30
+Python module to parse Erlang BEAM files.
31
+
32
+
33
+%package -n python2-%{realname}
34
+Summary: %{summary}
35
+BuildRequires: python-construct
36
+BuildRequires: python-devel
37
+BuildRequires: python-setuptools
38
+Requires: python-construct
39
+Requires: python-six >= 1.4.0
40
+Provides: python-%{realname} = %{version}-%{release}
41
+
42
+%description -n python2-%{realname}
43
+Python module to parse Erlang BEAM files.
44
+
45
+%if 0%{?with_python3}
46
+%package -n python3-%{realname}
47
+Summary: %{summary}
48
+BuildRequires: python3-construct
49
+BuildRequires: python3-devel
50
+BuildRequires: python3-setuptools
51
+Requires: python3-construct
52
+Requires: python3-six >= 1.4.0
53
+
54
+
55
+%description -n python3-%{realname}
56
+Python module to parse Erlang BEAM files.
57
+%endif
58
+
59
+%prep
60
+%setup -q -n %{realname}-%{version}
61
+
62
+%if 0%{?rhel} < 7
63
+%patch1 -p1
64
+%endif
65
+
66
+%build
67
+%if 0%{?fedora}
68
+%py2_build
69
+%else
70
+python setup.py build
71
+%endif
72
+%if 0%{?with_python3}
73
+%py3_build
74
+%endif
75
+
76
+%install
77
+# Must do the python2 install first because the scripts in /usr/bin are
78
+# overwritten with every setup.py install, and in general we want the
79
+# python3 version to be the default.
80
+%if 0%{?fedora}
81
+%py2_install
82
+%else
83
+python setup.py install -O1 --skip-build --root %{buildroot}
84
+%endif
85
+%if 0%{?with_python3}
86
+%py3_install
87
+%endif
88
+
89
+%check
90
+%if 0%{?fedora}
91
+%{__python2} setup.py test
92
+%else
93
+python setup.py test
94
+%endif
95
+%if 0%{?with_python3}
96
+%{__python3} setup.py test
97
+%endif
98
+
99
+%files -n python2-%{realname}
100
+%if 0%{?fedora}
101
+%license LICENSE
102
+%else
103
+%doc LICENSE
104
+%endif
105
+%doc README.md
106
+%{python2_sitelib}/*
107
+
108
+
109
+%if 0%{?with_python3}
110
+%files -n python3-%{realname}
111
+%if 0%{?fedora}
112
+%license LICENSE
113
+%else
114
+%doc LICENSE
115
+%endif
116
+%doc README.md
117
+%{python3_sitelib}/*
118
+%endif
119
+
120
+%changelog
121
+* Mon Feb 15 2016 Peter Lemenkov <lemenkov@gmail.com> - 0.3.2-1
122
+- Initial build
123
pybeam-0.3.2-python26.patch
Added
14
1
2
+diff -ur pybeam-0.3.2.orig/test/eetf_construct.py pybeam-0.3.2/test/eetf_construct.py
3
+--- pybeam-0.3.2.orig/test/eetf_construct.py 2014-05-31 13:24:56.000000000 +0200
4
++++ pybeam-0.3.2/test/eetf_construct.py 2016-05-29 12:02:23.363410399 +0200
5
+@@ -116,7 +116,7 @@
6
+ s = erlang_types.String(b'RoBurToVoY')
7
+ self.assertEqual(c.parse(c.build(s)),s)
8
+ n = b"\x01\x00" + b"".join(map(int2byte, range(0,256)))
9
+- self.assertListEqual(list(c.parse(n)), list(range(0,256)))
10
++ self.assertEqual(list(c.parse(n)), list(range(0,256)))
11
+ self.assertEqual(c.build(erlang_types.String(b"".join(map(int2byte, range(0,256))))), n)
12
+ def test_binary(self):
13
+ c = eetf_construct.binary
14
pybeam-0.3.2.tar.gz
Added
Refresh
Refresh
Login required, please
login
in order to comment
Request History
vanmeeuwen created request almost 9 years ago
Submit python-pybeam
vanmeeuwen accepted review almost 9 years ago
Accept
vanmeeuwen accepted review almost 9 years ago
Accept
vanmeeuwen approved review almost 9 years ago
Accept
vanmeeuwen accepted request almost 9 years ago
Accept