Bug 1233915 - jsonpickle: please add python3 subpackage
Summary: jsonpickle: please add python3 subpackage
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: python-jsonpickle
Version: 22
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Gwyn Ciesla
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-06-19 17:20 UTC by Zbigniew Jędrzejewski-Szmek
Modified: 2015-07-07 08:37 UTC (History)
1 user (show)

Fixed In Version: python-jsonpickle-0.9.2-1.fc23
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-07-07 08:37:26 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Zbigniew Jędrzejewski-Szmek 2015-06-19 17:20:51 UTC
Description of problem:
upstream supports python3. python3-jsonpickle is needed for music21 that I'm packaging now.

Comment 1 Zbigniew Jędrzejewski-Szmek 2015-07-02 16:02:21 UTC
I prepared the following changes to update to the latest upstream version and to add a python3 subpackage. Please have a look. If there are no objections, I'll push those changes and rebuild the package after a few days.

==> 0001-Update-to-latest-version-and-clean-up-spec-file.patch <==
From 3a2a6db2a6f60347bcdc4c2c2ee41a154a0d3b1c Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek.pl>
Date: Thu, 2 Jul 2015 11:21:32 -0400
Subject: [PATCH 1/4] Update to latest version and clean up spec file

---
 python-jsonpickle.spec | 25 +++++++++++++------------
 sources                |  2 +-
 2 files changed, 14 insertions(+), 13 deletions(-)

diff --git a/python-jsonpickle.spec b/python-jsonpickle.spec
index 4e945d887a..ae80dac9aa 100644
--- a/python-jsonpickle.spec
+++ b/python-jsonpickle.spec
@@ -1,19 +1,20 @@
 %{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
 
 Name:           python-jsonpickle
-Version:        0.4.0
-Release:        3%{?dist}
+Version:        0.9.2
+Release:        1%{?dist}
 Summary:        A module that allows any object to be serialized into JSON
 
 Group:          Development/Languages
 License:        BSD
 URL:            http://pypi.python.org/pypi/jsonpickle/
 Source0:        http://pypi.python.org/packages/source/j/jsonpickle/jsonpickle-%{version}.tar.gz
-BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 
 BuildArch:      noarch
-BuildRequires:  python-devel python-simplejson python-feedparser
-BuildRequires:  dos2unix
+BuildRequires:  python2-devel
+BuildRequires:  python-simplejson
+BuildRequires:  python-feedparser
+BuildRequires:  numpy
 Requires:       python-simplejson
 
 %description
@@ -23,6 +24,7 @@ to the pickle module.
 
 %prep
 %setup -q -n jsonpickle-%{version}
+rm -r *.egg-info
 
 
 %build
@@ -30,7 +32,6 @@ to the pickle module.
 
 
 %install
-rm -rf %{buildroot}
 %{__python} setup.py install -O1 --skip-build --root %{buildroot}
 
 
@@ -40,16 +41,16 @@ pushd tests
 popd
 
 
-%clean
-rm -rf %{buildroot}
-
-
 %files
-%defattr(-,root,root,-)
-%doc COPYING PKG-INFO
+%license COPYING
+%doc PKG-INFO
 %{python_sitelib}/*
 
 %changelog
+* Thu Jul  2 2015 Zbigniew Jędrzejewski-Szmek <zbyszek.pl> - 0.9.2-1
+- Update to latest version
+- Clean up spec file a bit
+
 * Thu Jun 18 2015 Fedora Release Engineering <rel-eng.org> - 0.4.0-3
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
 
diff --git a/sources b/sources
index df8e18bc00..888a20e6ae 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-63916228294218ca6e53fd1b16b626fa  jsonpickle-0.4.0.tar.gz
+579a44c19ae55af83cb7b0437dfbe7e3  jsonpickle-0.9.2.tar.gz
-- 
2.1.0


==> 0002-Add-more-dependencies-for-tests.patch <==
From bbc139f5d7d75e56b20b459e2004284ba72aaea9 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek.pl>
Date: Thu, 2 Jul 2015 11:40:50 -0400
Subject: [PATCH 2/4] Add more dependencies for tests

I think this is everything which is packaged for fedora.
yajl-py and jsonlib are not available.
---
 python-jsonpickle.spec | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/python-jsonpickle.spec b/python-jsonpickle.spec
index ae80dac9aa..f20e1e8b60 100644
--- a/python-jsonpickle.spec
+++ b/python-jsonpickle.spec
@@ -15,6 +15,10 @@ BuildRequires:  python2-devel
 BuildRequires:  python-simplejson
 BuildRequires:  python-feedparser
 BuildRequires:  numpy
+BuildRequires:  python-enum34
+BuildRequires:  python-bson
+BuildRequires:  python-ujson
+BuildRequires:  python-demjson
 Requires:       python-simplejson
 
 %description
-- 
2.1.0


==> 0003-Add-python3-subpackage.patch <==
From f1da8af68e2b4a7ba06bebf1a1fd1076ac5c9e09 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek.pl>
Date: Thu, 2 Jul 2015 11:57:10 -0400
Subject: [PATCH 3/4] Add python3 subpackage

---
 python-jsonpickle.spec | 40 ++++++++++++++++++++++++++++++++++++----
 1 file changed, 36 insertions(+), 4 deletions(-)

diff --git a/python-jsonpickle.spec b/python-jsonpickle.spec
index f20e1e8b60..5c42a19deb 100644
--- a/python-jsonpickle.spec
+++ b/python-jsonpickle.spec
@@ -10,7 +10,10 @@ License:        BSD
 URL:            http://pypi.python.org/pypi/jsonpickle/
 Source0:        http://pypi.python.org/packages/source/j/jsonpickle/jsonpickle-%{version}.tar.gz
 
+%global _docdir_fmt %{name}
+
 BuildArch:      noarch
+
 BuildRequires:  python2-devel
 BuildRequires:  python-simplejson
 BuildRequires:  python-feedparser
@@ -21,10 +24,30 @@ BuildRequires:  python-ujson
 BuildRequires:  python-demjson
 Requires:       python-simplejson
 
+%package -n python3-jsonpickle
+Summary:        A module that allows any object to be serialized into JSON
+
+BuildRequires:  python3-devel
+BuildRequires:  python3-simplejson
+BuildRequires:  python3-feedparser
+BuildRequires:  python3-numpy
+BuildRequires:  python3-bson
+# https://bugzilla.redhat.com/show_bug.cgi?id=1238787
+# BuildRequires:  python3-ujson
+BuildRequires:  python3-demjson
+Requires:       python3-simplejson
+
 %description
 This module allows python objects to be serialized to JSON in a similar fashion
 to the pickle module.
 
+This is the version for Python 2.
+
+%description -n python3-jsonpickle
+This module allows python objects to be serialized to JSON in a similar fashion
+to the pickle module.
+
+This is the version for Python 3.
 
 %prep
 %setup -q -n jsonpickle-%{version}
@@ -32,28 +55,37 @@ rm -r *.egg-info
 
 
 %build
-%{__python} setup.py build
+%{__python2} setup.py build
+%{__python3} setup.py build
 
 
 %install
-%{__python} setup.py install -O1 --skip-build --root %{buildroot}
+%{__python2} setup.py install -O1 --skip-build --root %{buildroot}
+%{__python3} setup.py install -O1 --skip-build --root %{buildroot}
 
 
 %check
 pushd tests
-./runtests.py
+%{__python2} ./runtests.py
+%{__python3} ./runtests.py
 popd
 
 
 %files
 %license COPYING
 %doc PKG-INFO
-%{python_sitelib}/*
+%{python2_sitelib}/*
+
+%files -n python3-jsonpickle
+%license COPYING
+%doc PKG-INFO
+%{python3_sitelib}/*
 
 %changelog
 * Thu Jul  2 2015 Zbigniew Jędrzejewski-Szmek <zbyszek.pl> - 0.9.2-1
 - Update to latest version
 - Clean up spec file a bit
+- Add python3 subpackage (#1233915)
 
 * Thu Jun 18 2015 Fedora Release Engineering <rel-eng.org> - 0.4.0-3
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
-- 
2.1.0


==> 0004-Do-not-install-PKG-INFO-as-doc.patch <==
From cd1b6eb34b5683b41b79b124f75d8e1595bcd4f1 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek.pl>
Date: Thu, 2 Jul 2015 11:59:29 -0400
Subject: [PATCH 4/4] Do not install PKG-INFO as %doc

It is installed along with the rest of egg-info data, so no
need to have it separately anymore.
---
 python-jsonpickle.spec | 2 --
 1 file changed, 2 deletions(-)

diff --git a/python-jsonpickle.spec b/python-jsonpickle.spec
index 5c42a19deb..0bee546673 100644
--- a/python-jsonpickle.spec
+++ b/python-jsonpickle.spec
@@ -73,12 +73,10 @@ popd
 
 %files
 %license COPYING
-%doc PKG-INFO
 %{python2_sitelib}/*
 
 %files -n python3-jsonpickle
 %license COPYING
-%doc PKG-INFO
 %{python3_sitelib}/*
 
 %changelog
-- 
2.1.0

Comment 2 Zbigniew Jędrzejewski-Szmek 2015-07-07 08:37:26 UTC
OK, pushed and built.


Note You need to log in before you can comment on or make changes to this bug.