[python-rencode/el6] initial import

T.C. Hollingsworth patches at fedoraproject.org
Mon May 6 21:12:13 UTC 2013


commit 03012dba63ab175e65dda3ca5e02bb14951164d2
Author: T.C. Hollingsworth <tchollingsworth at gmail.com>
Date:   Mon May 6 14:11:30 2013 -0700

    initial import

 .gitignore          |    1 +
 python-rencode.spec |   95 +++++++++++++++++++++++++++++++++++++++++++++++++++
 sources             |    1 +
 3 files changed, 97 insertions(+), 0 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index e69de29..40cf035 100644
--- a/.gitignore
+++ b/.gitignore
@@ -0,0 +1 @@
+/rencode-1.0.2-r33.tar.xz
diff --git a/python-rencode.spec b/python-rencode.spec
new file mode 100644
index 0000000..e7cf840
--- /dev/null
+++ b/python-rencode.spec
@@ -0,0 +1,95 @@
+# Remove private provides from .so files in the python_sitearch directory
+%global __provides_exclude_from ^%{python_sitearch}/.*\\.so$
+
+%global svn_rev 33
+%global svn_date 20121209
+
+Name:           python-rencode
+Version:        1.0.2
+Release:        2.%{svn_date}svn%{svn_rev}%{?dist}
+Summary:        Web safe object pickling/unpickling
+License:        GPLv3+ and BSD
+URL:            http://code.google.com/p/rencode/
+
+# svn export -r%%{svn_rev} http://rencode.googlecode.com/svn/trunk rencode-%%{version}-r%%{svn_rev}
+# tar -Jcf rencode-%%{version}-r%%{svn_rev}.tar.xz rencode-%%{version}-r%%{svn_rev} 
+Source0:        rencode-%{version}-r%{svn_rev}.tar.xz
+      
+BuildRequires:  python2-devel python3-devel
+BuildRequires:  Cython python3-Cython
+
+%description
+The rencode module is a modified version of bencode from the
+BitTorrent project.  For complex, heterogeneous data structures with
+many small elements, r-encodings take up significantly less space than
+b-encodings.
+
+%package -n python3-rencode
+Summary:    Web safe object pickling/unpickling
+
+%description -n python3-rencode
+The rencode module is a modified version of bencode from the
+BitTorrent project.  For complex, heterogeneous data structures with
+many small elements, r-encodings take up significantly less space than
+b-encodings.
+
+%prep
+%setup -qn rencode-%{version}-r%{svn_rev}
+
+rm -rf %{py3dir}
+cp -a . %{py3dir}
+find %{py3dir} -name '*.py' | xargs sed -i '1s|^#!python|#!%{__python3}|'
+
+find -name '*.py' | xargs sed -i '1s|^#!python|#!%{__python}|'
+
+%build
+CFLAGS="%{optflags}" %{__python} setup.py build
+
+pushd %{py3dir}
+CFLAGS="%{optflags}" %{__python3} setup.py build
+popd
+
+%install
+pushd %{py3dir}
+%{__python3} setup.py install --skip-build --root %{buildroot}
+popd
+
+%{__python} setup.py install -O1 --skip-build --root %{buildroot}
+
+#fix permissions on shared objects
+chmod 0755 \
+    %{buildroot}%{python_sitearch}/rencode/_rencode.so \
+    %{buildroot}%{python3_sitearch}/rencode/_rencode.cpython-33m.so
+
+%check
+pushd tests
+ln -sf %{buildroot}%{python_sitearch}/rencode rencode
+%{__python} test_rencode.py
+%{__python} timetest.py
+popd
+
+pushd %{py3dir}/tests
+ln -sf %{buildroot}%{python3_sitearch}/rencode rencode
+%{__python3} test_rencode.py
+%{__python3} timetest.py
+popd
+
+%files
+%{python_sitearch}/rencode
+%{python_sitearch}/rencode*.egg-info
+%doc COPYING README
+
+%files -n python3-rencode
+%{python3_sitearch}/rencode
+%{python3_sitearch}/rencode*.egg-info
+%doc COPYING README
+
+%changelog
+* Mon May 06 2013 T.C. Hollingsworth <tchollingsworth at gmail.com> - 1.0.2-2.20121209svn33
+- use macros consistently
+- fix permissions on shared objects
+- drop useless setuptools copypasta
+- fix License tag
+
+* Thu Apr 18 2013 T.C. Hollingsworth <tchollingsworth at gmail.com> - 1.0.2-1.20121209svn33
+- initial package
diff --git a/sources b/sources
index e69de29..9430ecf 100644
--- a/sources
+++ b/sources
@@ -0,0 +1 @@
+7a7c757d8f003fe640210f18b66c046e  rencode-1.0.2-r33.tar.xz


More information about the scm-commits mailing list