summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--python-future.spec45
1 files changed, 45 insertions, 0 deletions
diff --git a/python-future.spec b/python-future.spec
new file mode 100644
index 0000000..581c200
--- /dev/null
+++ b/python-future.spec
@@ -0,0 +1,45 @@
+%global srcname future
+
+%global py_name future
+
+Name: python3-future
+Version: 0.16.0
+Release: 1%{?dist}
+Summary: Clean single-source support for Python 3 and 2
+
+License: MIT
+URL: https://python-future.org
+Source0: https://pypi.io/packages/source/f/%{py_name}/%{py_name}-%{version}.tar.gz
+
+BuildArch: noarch
+
+BuildRequires: python3-devel
+BuildRequires: python3-setuptools
+
+
+%description
+Clean single-source support for Python 3 and 2
+
+%prep
+%autosetup -n future-%{version} -p1
+
+%build
+rm -Rf requirements.txt test-requirements.txt *.egg-info
+%{__python3} setup.py build
+
+%install
+%{__python3} setup.py install -O1 --skip-build --root %{buildroot}
+
+for bin in %{buildroot}%{_bindir}/*; do
+ mv ${bin} ${bin}-%{python3_version}
+ ln -s $(basename ${bin})-%{python3_version} ${bin}-3
+done
+
+%files
+%{_bindir}/*
+%defattr(644,root,root,755)
+%{python3_sitelib}/*
+
+%changelog
+* Thu Apr 12 2018 Fabien Boucher <fboucher@redhat.com> - 0.16.0-1
+- Initial packaging