public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/python-py] pr7: Update to 1.4.28.
@ 2026-08-01 11:43 Thomas Moschny
  0 siblings, 0 replies; only message in thread
From: Thomas Moschny @ 2026-08-01 11:43 UTC (permalink / raw)
  To: git-commits

            A new commit has been pushed.

            Repo   : rpms/python-py
            Branch : pr7
            Commit : 8275ff7abbe0a392fd7eddd1dc3a713f382fbb30
            Author : Thomas Moschny <thm@fedoraproject.org>
            Date   : 2015-05-29T19:20:43+02:00
            Stats  : +58/-30 in 3 file(s)
            URL    : https://src.fedoraproject.org/rpms/python-py/c/8275ff7abbe0a392fd7eddd1dc3a713f382fbb30?branch=pr7

            Log:
            Update to 1.4.28.

- Modernize spec file.
- Apply updates Python packaging guidelines.
- Mark LICENSE with %license.

---
diff --git a/.gitignore b/.gitignore
index 5478b3a..a71ae1c 100644
--- a/.gitignore
+++ b/.gitignore
@@ -27,3 +27,4 @@
 /py-1.4.24.tar.gz
 /py-1.4.25.tar.gz
 /py-1.4.26.tar.gz
+/py-1.4.28.tar.gz

diff --git a/python-py.spec b/python-py.spec
index 299b681..5005892 100644
--- a/python-py.spec
+++ b/python-py.spec
@@ -1,9 +1,10 @@
+%if 0%{?rhel} && 0%{?rhel} <= 6
+%{!?__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
+
 %if 0%{?fedora}
 %global with_python3 1
-%global python3_version %(%{__python3} -c "import sys; sys.stdout.write(sys.version[:3])")
-%endif
-%if 0%{?rhel} && 0%{?rhel} < 6
-%{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")}
 %endif
 
 # we have a circular (build) dependency with the (new) pytest package
@@ -14,8 +15,8 @@
 %global pytest_version 2.5
 
 Name:           python-py
-Version:        1.4.26
-Release:        2%{?dist}
+Version:        1.4.28
+Release:        1%{?dist}
 Summary:        Library with cross-python path, ini-parsing, io, code, log facilities
 Group:          Development/Languages
 License:        MIT and Public Domain
@@ -24,7 +25,7 @@ URL:            http://pylib.readthedocs.org/
 Source:         http://pypi.python.org/packages/source/p/py/py-%{version}.tar.gz
 BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 BuildArch:      noarch
-BuildRequires:  python-devel
+BuildRequires:  python2-devel
 BuildRequires:  python-setuptools
 Requires:       python-setuptools
 %if 0%{?with_docs}
@@ -77,20 +78,27 @@ following tools and modules:
 %endif # with_python3
 
 %prep
-%setup -q -n py-%{version}
+%setup -qc -n py-%{version}
+mv py-%{version} python2
 
+pushd python2
 # remove shebangs and fix permissions
 find -type f -a \( -name '*.py' -o -name 'py.*' \) \
    -exec sed -i '1{/^#!/d}' {} \; \
    -exec chmod u=rw,go=r {} \;
 
+# fix line-endings
+sed -i 's/\r//' README.txt
+popd
+
 %if 0%{?with_python3}
-cp -a . %{py3dir}
+cp -a python2 python3
 %endif # with_python3
 
 
 %build
-%{__python} setup.py build
+pushd python2
+%{__python2} setup.py build
 
 %if 0%{?with_docs}
 %if 0%{?rhel} > 6 || 0%{?fedora}
@@ -99,36 +107,41 @@ make -C doc html PYTHONPATH=$(pwd)
 make -C doc html SPHINXBUILD=sphinx-1.0-build PYTHONPATH=$(pwd)
 %endif # fedora
 %endif # with_docs
+popd
 
 %if 0%{?with_python3}
-pushd %{py3dir}
+pushd python3
 %{__python3} setup.py build
 popd
 %endif # with_python3
 
 
 %install
-rm -rf %{buildroot}
-%{__python} setup.py install -O1 --skip-build --root %{buildroot}
+pushd python2
+%{__python2} setup.py install -O1 --skip-build --root %{buildroot}
+
+# remove hidden file
+rm -rf doc/_build/html/.buildinfo
+popd
 
 %if 0%{?with_python3}
-pushd %{py3dir}
+pushd python3
 %{__python3} setup.py install -O1 --skip-build --root %{buildroot}
 popd
 %endif # with_python3
 
-# remove hidden file
-rm -rf doc/_build/html/.buildinfo
-
 
 %check
 # disable failing Subversion checks for now
 %if 0%{?run_check}
-PYTHONPATH=%{buildroot}%{python_sitelib} \
+pushd python2
+PYTHONPATH=%{buildroot}%{python2_sitelib} \
 LC_ALL="en_US.UTF-8" \
 py.test -r s -k"-TestWCSvnCommandPath" testing
+popd
+
 %if 0%{?with_python3}
-pushd %{py3dir}
+pushd python3
 PYTHONPATH=%{buildroot}%{python3_sitelib} \
 LC_ALL="en_US.UTF-8" \
 py.test-%{python3_version} -r s -k"-TestWCSvnCommandPath" testing
@@ -136,31 +149,45 @@ popd
 %endif # with_python3
 %endif # run_check
 
-%clean
-rm -rf %{buildroot}
-
 
 %files
-%defattr(-,root,root,-)
-%doc CHANGELOG LICENSE README.txt
+%doc python2/CHANGELOG
+%doc python2/README.txt
+%if 0%{?_licensedir:1}
+%license python2/LICENSE
+%else
+%doc python2/LICENSE
+%endif # licensedir
 %if 0%{?with_docs}
-%doc doc/_build/html
+%doc python2/doc/_build/html
 %endif # with_docs
-%{python_sitelib}/*
+%{python2_sitelib}/*
 
 
 %if 0%{?with_python3}
 %files -n python3-py
-%defattr(-,root,root,-)
-%doc CHANGELOG LICENSE README.txt
+%doc python3/CHANGELOG
+%doc python3/README.txt
+%if 0%{?_licensedir:1}
+%license python2/LICENSE
+%else
+%doc python2/LICENSE
+%endif # licensedir
 %if 0%{?with_docs}
-%doc doc/_build/html
+# HTML docs generated with Python2 for now
+%doc python2/doc/_build/html
 %endif # with_docs
 %{python3_sitelib}/*
 %endif # with_python3
 
 
 %changelog
+* Fri May 29 2015 Thomas Moschny <thomas.moschny@gmx.de> - 1.4.28-1
+- Update to 1.4.28.
+- Modernize spec file.
+- Apply updates Python packaging guidelines.
+- Mark LICENSE with %%license.
+
 * Sat Dec  6 2014 Thomas Moschny <thomas.moschny@gmx.de> - 1.4.26-2
 - Re-enable doc building and testsuite.
 

diff --git a/sources b/sources
index 07d2465..5b38763 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-30c3fd92a53f1a5ed6f3591c1fe75c0e  py-1.4.26.tar.gz
+30b807e1fe1b886578c47337d424a083  py-1.4.28.tar.gz

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2026-08-01 11:43 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-08-01 11:43 [rpms/python-py] pr7: Update to 1.4.28 Thomas Moschny

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox