From f99038c2d8ad7019ef3cc4e9276a36d075bb1e560968cf5618d4eb53261096bb Mon Sep 17 00:00:00 2001 From: Todd R Date: Sun, 2 Oct 2016 18:24:38 +0000 Subject: [PATCH 1/4] OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-py2pack?expand=0&rev=54 --- call_python2.patch | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 call_python2.patch diff --git a/call_python2.patch b/call_python2.patch new file mode 100644 index 0000000..dc4b820 --- /dev/null +++ b/call_python2.patch @@ -0,0 +1,14 @@ + + + +--- a/py2pack/requires.py ++++ b/py2pack/requires.py +@@ -52,7 +52,7 @@ + else: + os.chdir(tmp_dir) + # generate a temporary json file which contains the metadata +- cmd = "python setup.py -q --command-packages py2pack " \ ++ cmd = "python3 setup.py -q --command-packages py2pack " \ + "get_metadata -o %s " % tempfile_json.name + try: + subprocess.check_output(cmd, stderr=subprocess.STDOUT, shell=True) From ef57604160ed8885920b572721e8f26e62b5689d2d57b59580a1731de5e8eb0d Mon Sep 17 00:00:00 2001 From: Todd R Date: Sun, 2 Oct 2016 18:25:33 +0000 Subject: [PATCH 2/4] OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-py2pack?expand=0&rev=55 --- call_python2.patch | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/call_python2.patch b/call_python2.patch index dc4b820..134f32a 100644 --- a/call_python2.patch +++ b/call_python2.patch @@ -1,5 +1,10 @@ +From: toddrme2178@gmail.com +Date: 2016-10-02 14:21:00 +0000 +Subject: Use python2 for subprocess +This patch makes sure the correct version of py2pack is called. +--- --- a/py2pack/requires.py +++ b/py2pack/requires.py @@ -8,7 +13,7 @@ os.chdir(tmp_dir) # generate a temporary json file which contains the metadata - cmd = "python setup.py -q --command-packages py2pack " \ -+ cmd = "python3 setup.py -q --command-packages py2pack " \ ++ cmd = "python setup.py -q --command-packages py2pack2 " \ "get_metadata -o %s " % tempfile_json.name try: subprocess.check_output(cmd, stderr=subprocess.STDOUT, shell=True) From ea976f6529e97d350e518e74b9c65c5ded019f8554d57b3afc884a5c1719e2d3 Mon Sep 17 00:00:00 2001 From: Todd R Date: Sun, 2 Oct 2016 18:25:59 +0000 Subject: [PATCH 3/4] OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-py2pack?expand=0&rev=56 --- call_python2.patch | 19 ------------------- 1 file changed, 19 deletions(-) delete mode 100644 call_python2.patch diff --git a/call_python2.patch b/call_python2.patch deleted file mode 100644 index 134f32a..0000000 --- a/call_python2.patch +++ /dev/null @@ -1,19 +0,0 @@ -From: toddrme2178@gmail.com -Date: 2016-10-02 14:21:00 +0000 -Subject: Use python2 for subprocess - -This patch makes sure the correct version of py2pack is called. - ---- - ---- a/py2pack/requires.py -+++ b/py2pack/requires.py -@@ -52,7 +52,7 @@ - else: - os.chdir(tmp_dir) - # generate a temporary json file which contains the metadata -- cmd = "python setup.py -q --command-packages py2pack " \ -+ cmd = "python setup.py -q --command-packages py2pack2 " \ - "get_metadata -o %s " % tempfile_json.name - try: - subprocess.check_output(cmd, stderr=subprocess.STDOUT, shell=True) From a95f0479a9c5419faca09b5a2376173d5cf1671fb45cc5170ab594bf88821e7c Mon Sep 17 00:00:00 2001 From: Thomas Bechtold Date: Tue, 14 Feb 2017 12:12:17 +0000 Subject: [PATCH 4/4] - update to 0.7.0: * Switch to pbr * Include doc/* in sdist tarball * Add Shinx config to setup.cfg * Post release version bump to 0.6.7 * Bump version to 0.6.6 * Set files.pythonhosted.org as Source url * Also search for tarballs with underscores * Set pypi.io url for Source * Remove deprecated metadata subcommand * doc: Move CLI help to extra document * Support multiple template directories * Fix pep8 error * Use Sphinx for documentation * Remove hardcoded markers * Add license wit FIXME if available * Fix extensions for openSUSE template * Add script to create packages for OBS * Switch to metaextract * Improve openSUSE template checks * Update repository name after move to openSUSE - Adjust Requires OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-py2pack?expand=0&rev=57 --- py2pack-0.6.4.tar.gz | 3 --- py2pack-0.7.0.tar.gz | 3 +++ python-py2pack.changes | 26 ++++++++++++++++++++++++++ python-py2pack.spec | 37 ++++++++++++++----------------------- 4 files changed, 43 insertions(+), 26 deletions(-) delete mode 100644 py2pack-0.6.4.tar.gz create mode 100644 py2pack-0.7.0.tar.gz diff --git a/py2pack-0.6.4.tar.gz b/py2pack-0.6.4.tar.gz deleted file mode 100644 index a1f2f07..0000000 --- a/py2pack-0.6.4.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:4dbc7b74f588f227448fdd1616b75315cb5adfe017e416f9400fc1402219a01b -size 28099 diff --git a/py2pack-0.7.0.tar.gz b/py2pack-0.7.0.tar.gz new file mode 100644 index 0000000..1a1bd6a --- /dev/null +++ b/py2pack-0.7.0.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e40f175ab5f5d4fd75eac2d9984a3150b06c67493365b3bd7730885daf29c1ed +size 36460 diff --git a/python-py2pack.changes b/python-py2pack.changes index da92cb7..9053810 100644 --- a/python-py2pack.changes +++ b/python-py2pack.changes @@ -1,3 +1,29 @@ +------------------------------------------------------------------- +Tue Feb 14 11:49:36 UTC 2017 - tbechtold@suse.com + +- update to 0.7.0: + * Switch to pbr + * Include doc/* in sdist tarball + * Add Shinx config to setup.cfg + * Post release version bump to 0.6.7 + * Bump version to 0.6.6 + * Set files.pythonhosted.org as Source url + * Also search for tarballs with underscores + * Set pypi.io url for Source + * Remove deprecated metadata subcommand + * doc: Move CLI help to extra document + * Support multiple template directories + * Fix pep8 error + * Use Sphinx for documentation + * Remove hardcoded markers + * Add license wit FIXME if available + * Fix extensions for openSUSE template + * Add script to create packages for OBS + * Switch to metaextract + * Improve openSUSE template checks + * Update repository name after move to openSUSE +- Adjust Requires + ------------------------------------------------------------------- Mon Aug 15 06:47:32 UTC 2016 - tbechtold@suse.com diff --git a/python-py2pack.spec b/python-py2pack.spec index 8aceec3..e005a86 100644 --- a/python-py2pack.spec +++ b/python-py2pack.spec @@ -1,7 +1,7 @@ # # spec file for package python-py2pack # -# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -17,7 +17,7 @@ Name: python-py2pack -Version: 0.6.4 +Version: 0.7.0 Release: 0 Url: http://github.com/saschpe/py2pack Summary: Generate distribution packages from Python packages on PyPI @@ -26,26 +26,18 @@ Group: Development/Languages/Python Source: https://pypi.io/packages/source/p/py2pack/py2pack-%{version}.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildRequires: python-Jinja2 -BuildRequires: python-argparse -BuildRequires: python-cssselect +BuildRequires: python-Sphinx BuildRequires: python-devel -BuildRequires: python-lxml -BuildRequires: python-requests -BuildRequires: python-setuptools +BuildRequires: python-pbr BuildRequires: python-six +BuildRequires: python-sphinxcontrib-programoutput Requires: python-Jinja2 -Requires: python-argparse -Requires: python-cssselect -Requires: python-lxml -Requires: python-requests +Requires: python-metaextract +Requires: python-pbr Requires: python-six Requires(post): update-alternatives Requires(postun): update-alternatives -%if 0%{?suse_version} && 0%{?suse_version} <= 1110 -%{!?python_sitelib: %global python_sitelib %(python -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")} -%else BuildArch: noarch -%endif %description This script allows to generate RPM spec or DEB dsc files from Python modules. @@ -55,19 +47,19 @@ universal tool to package Python modules. %prep %setup -q -n py2pack-%{version} -#sed -i "1d" py2pack/py2pack.py # Fix non-executable script %build python setup.py build +python setup.py build_sphinx +# remove the sphinx-build leftovers +rm -rf doc/build/html/.{doctrees,buildinfo} %install python setup.py install --prefix=%{_prefix} --root=%{buildroot} -# The setup script installs stuff into '/usr/local', move stuff around accordingly -install -d %{buildroot}%{_mandir}/man1 -install -d %{buildroot}%{_docdir}/%{name} -mv %{buildroot}/usr/share/doc/py2pack/* %{buildroot}%{_docdir}/%{name} -mv %{buildroot}/usr/man/man1/py2pack.1 %{buildroot}%{_mandir}/man1/py2pack-%{py_ver}.1 +install -d %{buildroot}%{_mandir}/man1 + +mv doc/build/man/py2pack.1 %{buildroot}%{_mandir}/man1/py2pack-%{py_ver}.1 ln -s -f %{_sysconfdir}/alternatives/py2pack.1.gz %{buildroot}%{_mandir}/man1/py2pack.1.gz # Prepare for update-alternatives usage @@ -91,14 +83,13 @@ fi %files %defattr(-,root,root,-) -%doc AUTHORS LICENSE README.rst +%doc AUTHORS LICENSE README.rst doc/build/html %{_bindir}/py2pack %{_bindir}/py2pack-%{py_ver} %{_mandir}/man1/py2pack.1.gz %{_mandir}/man1/py2pack-%{py_ver}.1.gz %ghost %{_sysconfdir}/alternatives/py2pack %ghost %{_sysconfdir}/alternatives/py2pack.1.gz -%{_docdir}/%{name} %{python_sitelib}/py2pack-%{version}-py*.egg-info %{python_sitelib}/py2pack