[packages/python-sh] Initial 1.08-1; works
mmazur
mmazur at pld-linux.org
Thu Sep 18 14:46:44 CEST 2014
commit 11808d002cbb26518cfc4de61df8c58992222e54
Author: Mariusz Mazur <mmazur at axeos.com>
Date: Thu Sep 18 12:46:21 2014 +0000
Initial 1.08-1; works
python-sh.spec | 112 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 112 insertions(+)
---
diff --git a/python-sh.spec b/python-sh.spec
new file mode 100644
index 0000000..86d1af2
--- /dev/null
+++ b/python-sh.spec
@@ -0,0 +1,112 @@
+#
+# Conditional build:
+%bcond_without python2 # CPython 2.x module
+%bcond_without python3 # CPython 3.x module
+
+%define module sh
+Summary: SH module for python
+Summary(pl.UTF-8): Moduł sh dla pythona
+# Name must match the python module/package name (as in 'import' statement)
+Name: python-%{module}
+Version: 1.08
+Release: 1
+License: Free for use
+Group: Libraries/Python
+Source0: https://github.com/amoffat/sh/archive/%{version}.tar.gz
+# Source0-md5: a89e4600d9500210b78dbcefad63b443
+URL: https://amoffat.github.io/sh/
+# remove BR: python-devel for 'noarch' packages.
+BuildRequires: rpm-pythonprov
+# if py_postclean is used
+BuildRequires: rpmbuild(macros) >= 1.219
+# when using /usr/bin/env or other in-place substitutions
+#BuildRequires: sed >= 4.0
+%if %{with python2}
+BuildRequires: python-devel
+BuildRequires: python-distribute
+%endif
+%if %{with python3}
+BuildRequires: python3-devel
+BuildRequires: python3-distribute
+BuildRequires: python3-modules
+%endif
+#Requires: python-libs
+Requires: python-modules
+BuildArch: noarch
+BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
+
+%description
+
+%description -l pl.UTF-8
+
+%package -n python3-%{module}
+Summary: SH module for python 3
+Summary(pl.UTF-8): Moduł sh dla pythona 3
+Group: Libraries/Python
+
+%description -n python3-%{module}
+
+%description -n python3-%{module} -l pl.UTF-8
+
+%prep
+%setup -q -n %{module}-%{version}
+
+%build
+%if %{with python2}
+# CC/CFLAGS is only for arch packages - remove on noarch packages
+CC="%{__cc}" \
+CFLAGS="%{rpmcflags}" \
+%{__python} setup.py build --build-base build-2
+%endif
+
+%if %{with python3}
+# CC/CFLAGS is only for arch packages - remove on noarch packages
+CC="%{__cc}" \
+CFLAGS="%{rpmcflags}" \
+%{__python3} setup.py build --build-base build-3
+%endif
+
+%install
+rm -rf $RPM_BUILD_ROOT
+
+%if %{with python2}
+%{__python} setup.py \
+ build --build-base build-2 \
+ install --skip-build \
+ --optimize=2 \
+ --root=$RPM_BUILD_ROOT
+
+%py_postclean
+%endif
+
+%if %{with python3}
+%{__python3} setup.py \
+ build --build-base build-3 \
+ install --skip-build \
+ --optimize=2 \
+ --root=$RPM_BUILD_ROOT
+%endif
+
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%if %{with python2}
+%files
+%defattr(644,root,root,755)
+%doc AUTHORS.md CHANGELOG.md README.md
+%{py_sitescriptdir}/*.py[co]
+%if "%{py_ver}" > "2.4"
+%{py_sitescriptdir}/sh-*.egg-info
+%endif
+%endif
+
+%if %{with python3}
+%files -n python3-%{module}
+%defattr(644,root,root,755)
+%doc AUTHORS.md CHANGELOG.md README.md
+%{py3_sitescriptdir}/*.py
+%{py3_sitescriptdir}/__pycache__
+%{py3_sitescriptdir}/%{module}-*.egg-info
+%endif
+
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/python-sh.git/commitdiff/11808d002cbb26518cfc4de61df8c58992222e54
More information about the pld-cvs-commit
mailing list