fab pushed to python-rarfile (master). "inital import"

notifications at fedoraproject.org notifications at fedoraproject.org
Sun Apr 12 11:20:12 UTC 2015


>From db1f1088bb39718d8a9e2db10a18bbfc66fe4224 Mon Sep 17 00:00:00 2001
From: Fabian Affolter <fabian at affolter-engineering.ch>
Date: Sun, 12 Apr 2015 13:19:35 +0200
Subject: inital import


diff --git a/.gitignore b/.gitignore
index e69de29..b27d4f5 100644
--- a/.gitignore
+++ b/.gitignore
@@ -0,0 +1 @@
+/rarfile-2.7.tar.gz
diff --git a/python-rarfile.spec b/python-rarfile.spec
new file mode 100644
index 0000000..499d239
--- /dev/null
+++ b/python-rarfile.spec
@@ -0,0 +1,85 @@
+%if 0%{?fedora} > 12
+%global with_python3 1
+%else
+%{!?__python2: %global __python2 /usr/bin/python2}
+%{!?python2_sitelib: %global python2_sitelib %(%{__python2} -c "from distutils.sysconfig import get_python_lib; print (get_python_lib())")}
+%endif
+
+%global scrname rarfile
+
+Name:           python-%{scrname}
+Version:        2.7
+Release:        1%{?dist}
+Summary:        A RAR archive reader for Python
+
+License:        ISC
+URL:            https://github.com/markokr/rarfile
+Source0:        https://pypi.python.org/packages/source/r/%{scrname}/%{scrname}-%{version}.tar.gz
+Buildarch:      noarch
+
+BuildRequires:  python2-devel
+BuildRequires:  python-setuptools
+
+%if 0%{?with_python3}
+BuildRequires:  python3-devel
+BuildRequires:  python3-setuptools
+%endif
+
+%description
+This is Python module for RAR archive reading. The interface is made as
+zipfile like as possible.
+
+%if 0%{?with_python3}
+%package -n python3-%{scrname}
+Summary:        A RAR archive reader for Python
+BuildArch:      noarch
+
+%description -n python3-%{scrname}
+This is Python module for RAR archive reading. The interface is made as
+zipfile like as possible.
+%endif
+
+%prep
+%setup -q -n %{scrname}-%{version}
+find -name '*.py' | xargs sed -i '1s|^#!python|#!%{__python2}|'
+rm -rf %{srcname}.egg-info
+%if 0%{?with_python3}
+rm -rf %{py3dir}
+cp -a . %{py3dir}
+find %{py3dir} -name '*.py' | xargs sed -i '1s|^#!python|#!%{__python3}|'
+%endif
+
+%build
+%{__python2} setup.py build
+%if 0%{?with_python3}
+pushd %{py3dir}
+%{__python3} setup.py build
+popd
+%endif # with_python3
+
+%install
+%if 0%{?with_python3}
+pushd %{py3dir}
+%{__python3} setup.py install --skip-build --root %{buildroot}
+popd
+%endif # with_python3
+%{__python2} setup.py install --skip-build --root %{buildroot}
+
+%files
+%doc README.rst
+%license LICENSE
+%{python2_sitelib}/%{scrname}.py*
+%{python2_sitelib}/%{scrname}*.egg-info
+
+%if 0%{?with_python3}
+%files -n python3-%{scrname}
+%doc README.rst
+%license LICENSE
+%{python3_sitelib}/%{scrname}.py*
+%{python3_sitelib}/%{scrname}*.egg-info
+%{python3_sitelib}/__pycache__/%{scrname}*
+%endif # with_python3
+
+%changelog
+* Sun Mar 15 2015 Fabian Affolter <mail at fabian-affolter.ch> - 2.7-1
+- Initial package
diff --git a/sources b/sources
index e69de29..6d487ea 100644
--- a/sources
+++ b/sources
@@ -0,0 +1 @@
+d143205f22078830451e0066c123580d  rarfile-2.7.tar.gz
-- 
cgit v0.10.2


	http://pkgs.fedoraproject.org/cgit/python-rarfile.git/commit/?h=master&id=db1f1088bb39718d8a9e2db10a18bbfc66fe4224


More information about the scm-commits mailing list