commit 2a5340e939f08dfdbcf11c245c96521b4a2f4922
Author: Jacek Konieczny <[email protected]>
Date:   Tue Dec 27 15:14:49 2016 +0100

    renamed, python3 support added
    
    - Zope-Deprecation renamed to python-zope.deprecation
    - Python3 support added
    - tests also installed (they _are_ useful)
    - TODO dropped, comment about py_sitedir added

 Zope-Deprecation.spec        |  64 ---------------------------
 python-zope.deprecation.spec | 102 +++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 102 insertions(+), 64 deletions(-)
---
diff --git a/Zope-Deprecation.spec b/Zope-Deprecation.spec
deleted file mode 100644
index ef7e75c..0000000
--- a/Zope-Deprecation.spec
+++ /dev/null
@@ -1,64 +0,0 @@
-# TODO
-# - why it was needed to move code to py_sitedir in 
99929afd5fede7d191f944c30d2cfa692454ba84 ?
-#
-# Conditional build:
-%bcond_without tests   # do not perform "make test"
-
-Summary:       Deprecation library for Python code
-Summary(pl.UTF-8):     Biblioteka odradzająca dla kodu w Pythonie
-Name:          Zope-Deprecation
-Version:       4.0.2
-Release:       2
-License:       ZPL 2.1
-Group:         Libraries/Python
-Source0:       
http://pypi.python.org/packages/source/z/zope.deprecation/zope.deprecation-%{version}.tar.gz
-# Source0-md5: 5f8cecce85f2783f9e020f1288e908fd
-URL:           http://docs.zope.org/zope.deprecation/
-BuildRequires: python >= 1:2.6
-BuildRequires: python-devel >= 1:2.5
-BuildRequires: python-setuptools
-BuildRequires: rpm-pythonprov
-BuildRequires: rpmbuild(macros) >= 1.710
-Requires:      Zope-Testing
-Requires:      python-modules
-# not noarch because of py_sitedir in 99929afd5fede7d191f944c30d2cfa692454ba84
-#BuildArch:    noarch
-BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
-
-%description
-This package provides a simple function called deprecated(names, reason) to
-mark deprecated modules, classes, functions, methods and properties.
-
-%description -l pl.UTF-8
-Biblioteka odradzająca dla kodu w Pythonie.
-
-%prep
-%setup -q -n zope.deprecation-%{version}
-
-%build
-%py_build
-
-%{?with_tests:%{__python} setup.py test}
-
-%install
-rm -rf $RPM_BUILD_ROOT
-%py_install \
-       --install-purelib=%{py_sitedir} \
-       --skip-build \
-       --optimize 2 \
-       --root=$RPM_BUILD_ROOT
-
-%{__rm} $RPM_BUILD_ROOT%{py_sitedir}/zope/deprecation/tests.py[co]
-
-%py_postclean
-
-%clean
-rm -rf $RPM_BUILD_ROOT
-
-%files
-%defattr(644,root,root,755)
-%doc CHANGES.txt
-%dir %{py_sitedir}/zope/deprecation
-%{py_sitedir}/zope/deprecation/*.py[co]
-%{py_sitedir}/zope.deprecation-*.egg-info
-%{py_sitedir}/zope.deprecation-*-nspkg.pth
diff --git a/python-zope.deprecation.spec b/python-zope.deprecation.spec
new file mode 100644
index 0000000..2a099db
--- /dev/null
+++ b/python-zope.deprecation.spec
@@ -0,0 +1,102 @@
+#
+# Conditional build:
+%bcond_without tests   # do not perform "make test"
+%bcond_without python2 # CPython 2.x module
+%bcond_without python3 # CPython 3.x module
+
+%define        module  zope.deprecation
+Summary:       Deprecation library for Python code
+Summary(pl.UTF-8):     Biblioteka odradzająca dla kodu w Pythonie
+Name:          python-%{module}
+Version:       4.0.2
+Release:       1
+License:       ZPL 2.1
+Group:         Libraries/Python
+Source0:       
http://pypi.python.org/packages/source/z/zope.deprecation/zope.deprecation-%{version}.tar.gz
+# Source0-md5: 5f8cecce85f2783f9e020f1288e908fd
+URL:           http://docs.zope.org/zope.deprecation/
+BuildRequires: rpm-pythonprov
+BuildRequires: rpmbuild(macros) >= 1.710
+%if %{with python2}
+BuildRequires: python >= 1:2.6
+BuildRequires: python-setuptools
+%endif
+%if %{with python3}
+BuildRequires: python3
+BuildRequires: python3-setuptools
+%endif
+Requires:      python-zope.testing
+Obsoletes:     Zope-Deprecation
+Provides:      Zope-Deprecation
+BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
+
+%description
+This package provides a simple function called deprecated(names, reason) to
+mark deprecated modules, classes, functions, methods and properties.
+
+%description -l pl.UTF-8
+Biblioteka odradzająca dla kodu w Pythonie.
+
+%package -n python3-%{module}
+Summary:       Deprecation library for Python code
+Summary(pl.UTF-8):     Biblioteka odradzająca dla kodu w Pythonie
+Group:         Libraries/Python
+Requires:      python3-zope.testing
+
+%description -n python3-%{module}
+This package provides a simple function called deprecated(names, reason) to
+mark deprecated modules, classes, functions, methods and properties.
+
+%description -n python3-%{module} -l pl.UTF-8
+Biblioteka odradzająca dla kodu w Pythonie.
+
+%prep
+%setup -q -n zope.deprecation-%{version}
+
+%build
+%if %{with python2}
+%py_build %{?with_tests:test}
+%endif
+
+%if %{with python3}
+%py3_build %{?with_tests:test}
+%endif
+
+%install
+rm -rf $RPM_BUILD_ROOT
+
+%if %{with python2}
+# py_sitedir needed as there is the rest of zope.* and it contains some 
platform-specific code
+%py_install \
+       --install-purelib=%{py_sitedir}
+
+%py_postclean
+%endif
+
+%if %{with python3}
+# py_sitedir needed as there is the rest of zope.* and it contains some 
platform-specific code
+%py3_install \
+       --install-purelib=%{py3_sitedir}
+%endif
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%if %{with python2}
+%files
+%defattr(644,root,root,755)
+%doc CHANGES.txt
+%dir %{py_sitedir}/zope/deprecation
+%{py_sitedir}/zope/deprecation/*.py[co]
+%{py_sitedir}/zope.deprecation-*.egg-info
+%{py_sitedir}/zope.deprecation-*-nspkg.pth
+%endif
+
+%if %{with python3}
+%files -n python3-%{module}
+%defattr(644,root,root,755)
+%doc CHANGES.txt
+%{py3_sitedir}/zope/deprecation
+%{py3_sitedir}/zope.deprecation-*.egg-info
+%{py3_sitedir}/zope.deprecation-*-nspkg.pth
+%endif
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/python-zope.deprecation.git/commitdiff/2a5340e939f08dfdbcf11c245c96521b4a2f4922

_______________________________________________
pld-cvs-commit mailing list
[email protected]
http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit

Reply via email to