public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
From: Orion Poplawski <orion@cora.nwra.com>
To: git-commits@fedoraproject.org
Subject: [rpms/python-jsonschema] 2488367: Enable python3 builds for EPEL (bug #1395653)
Date: Mon, 15 Jun 2026 07:29:24 GMT [thread overview]
Message-ID: <178150856469.1.1947152878591772111.rpms-python-jsonschema-70e86e16a64f@fedoraproject.org> (raw)
A new commit has been pushed.
Repo : rpms/python-jsonschema
Branch : 2488367
Commit : 70e86e16a64f07642e3d267f3410812bb6387a87
Author : Orion Poplawski <orion@cora.nwra.com>
Date : 2016-11-21T09:31:46-07:00
Stats : +39/-37 in 1 file(s)
URL : https://src.fedoraproject.org/rpms/python-jsonschema/c/70e86e16a64f07642e3d267f3410812bb6387a87?branch=2488367
Log:
Enable python3 builds for EPEL (bug #1395653)
- Ship python2-jsonschema
- Modernize spec
- Use %license
---
diff --git a/python-jsonschema.spec b/python-jsonschema.spec
index e17901c..44f46f8 100644
--- a/python-jsonschema.spec
+++ b/python-jsonschema.spec
@@ -1,15 +1,11 @@
# Created by pyp2rpm-0.4.2
%global pypi_name jsonschema
-%if 0%{?fedora} > 12
%global with_python3 1
-%else
-%{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print (get_python_lib())")}
-%endif
Name: python-%{pypi_name}
Version: 2.5.1
-Release: 2%{?dist}
+Release: 3%{?dist}
Summary: An implementation of JSON Schema validation for Python
License: MIT
@@ -30,14 +26,11 @@ BuildRequires: python-mock
# Alternative for functools32.lru_cache
BuildRequires: python-repoze-lru
%if 0%{?with_python3}
-BuildRequires: python3-devel
-BuildRequires: python3-nose
-BuildRequires: python3-mock
+BuildRequires: python%{python3_pkgversion}-devel
+BuildRequires: python%{python3_pkgversion}-nose
+BuildRequires: python%{python3_pkgversion}-mock
%endif
-#Requires: python-functools32
-Requires: python-repoze-lru
-
# avoid functools32, vcversioner
Patch0: avoid-unpackaged.patch
@@ -45,10 +38,22 @@ Patch0: avoid-unpackaged.patch
jsonschema is JSON Schema validator currently based on
http://tools.ietf.org/html/draft-zyp-json-schema-03
+%package -n python2-%{pypi_name}
+Summary: An implementation of JSON Schema validation for Python 2
+#Requires: python-functools32
+Requires: python-repoze-lru
+%{?python_provide:%python_provide python2-%{pypi_name}}
+
+%description -n python2-%{pypi_name}
+jsonschema is JSON Schema validator currently based on
+http://tools.ietf.org/html/draft-zyp-json-schema-03
+
%if 0%{?with_python3}
-%package -n python3-%{pypi_name}
-Summary: An implementation of JSON Schema validation for Python
-%description -n python3-%{pypi_name}
+%package -n python%{python3_pkgversion}-%{pypi_name}
+Summary: An implementation of JSON Schema validation for Python %{python3_version}
+%{?python_provide:%python_provide python%{python3_pkgversion}-%{pypi_name}}
+
+%description -n python%{python3_pkgversion}-%{pypi_name}
jsonschema is JSON Schema validator currently based on
http://tools.ietf.org/html/draft-zyp-json-schema-03
%endif
@@ -56,52 +61,49 @@ http://tools.ietf.org/html/draft-zyp-json-schema-03
%prep
%setup -q -n %{pypi_name}-%{version}
%patch0 -p1
-%if 0%{?with_python3}
-rm -rf %{py3dir}
-cp -a . %{py3dir}
-find %{py3dir} -name '*.py' | xargs sed -i '1s|^#!python|#!%{__python3}|'
-%endif # with_python3
%build
%if 0%{?with_python3}
-pushd %{py3dir}
- %{__python3} setup.py build
-popd
+%py3_build
%endif
-%{__python} setup.py build
+%py2_build
%install
%if 0%{?with_python3}
-pushd %{py3dir}
- %{__python3} setup.py install -O1 --skip-build --root %{buildroot}
-popd
+%py3_install
%endif
-%{__python} setup.py install -O1 --skip-build --root %{buildroot}
+%py2_install
%check
%if 0%{?with_python3}
-pushd %{py3dir}
- %{_bindir}/nosetests-3* -v
-popd
+%{_bindir}/nosetests-%{python3_version} -v
%endif
-%{_bindir}/nosetests -v
+%{_bindir}/nosetests-%{python2_version} -v
-%files
-%doc README.rst COPYING
+%files -n python2-%{pypi_name}
+%license COPYING
+%doc README.rst
%{_bindir}/jsonschema
-%{python_sitelib}/%{pypi_name}/
-%{python_sitelib}/%{pypi_name}-%{version}-py?.?.egg-info
+%{python2_sitelib}/%{pypi_name}/
+%{python2_sitelib}/%{pypi_name}-%{version}-py?.?.egg-info
%if 0%{?with_python3}
-%files -n python3-%{pypi_name}
-%doc README.rst COPYING
+%files -n python%{python3_pkgversion}-%{pypi_name}
+%license COPYING
+%doc README.rst
%{python3_sitelib}/%{pypi_name}/
%{python3_sitelib}/%{pypi_name}-%{version}-py?.?.egg-info
%endif
%changelog
+* Mon Nov 21 2016 Orion Poplawski <orion@cora.nwra.com> - 2.5.1-3
+- Enable python3 builds for EPEL (bug #1395653)
+- Ship python2-jsonschema
+- Modernize spec
+- Use %%license
+
* Tue Jul 19 2016 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.5.1-2
- https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages
reply other threads:[~2026-06-15 7:29 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=178150856469.1.1947152878591772111.rpms-python-jsonschema-70e86e16a64f@fedoraproject.org \
--to=orion@cora.nwra.com \
--cc=git-commits@fedoraproject.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox