public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
From: Thomas Spura <thomas.spura@gmail.com>
To: git-commits@fedoraproject.org
Subject: [rpms/python-jsonschema] 2488367: Add python3 subpackage and enable tests
Date: Mon, 15 Jun 2026 07:29:18 GMT [thread overview]
Message-ID: <178150855869.1.14289208343800871681.rpms-python-jsonschema-83756b6157f7@fedoraproject.org> (raw)
A new commit has been pushed.
Repo : rpms/python-jsonschema
Branch : 2488367
Commit : 83756b6157f785a72070592b67e477826359bed7
Author : Thomas Spura <thomas.spura@gmail.com>
Date : 2013-10-17T08:55:28+02:00
Stats : +55/-1 in 1 file(s)
URL : https://src.fedoraproject.org/rpms/python-jsonschema/c/83756b6157f785a72070592b67e477826359bed7?branch=2488367
Log:
Add python3 subpackage and enable tests
---
diff --git a/python-jsonschema.spec b/python-jsonschema.spec
index d1e7d11..0edff99 100644
--- a/python-jsonschema.spec
+++ b/python-jsonschema.spec
@@ -1,9 +1,15 @@
# 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.0.0
-Release: 1%{?dist}
+Release: 2%{?dist}
Summary: An implementation of JSON Schema validation for Python
License: MIT
@@ -11,30 +17,78 @@ URL: http://pypi.python.org/pypi/jsonschema
Source0: http://pypi.python.org/packages/source/j/jsonschema/%{pypi_name}-%{version}.tar.gz
BuildArch: noarch
BuildRequires: python2-devel
+BuildRequires: python-nose
+BuildRequires: python-mock
+%if 0%{with_python3}
+BuildRequires: python3-devel
+BuildRequires: python3-nose
+BuildRequires: python3-mock
+%endif
%description
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}
+jsonschema is JSON Schema validator currently based on
+http://tools.ietf.org/html/draft-zyp-json-schema-03
+%endif
+
%prep
%setup -q -n %{pypi_name}-%{version}
+%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
+%endif
%{__python} setup.py build
%install
+%if 0%{with_python3}
+pushd %{py3dir}
+ %{__python3} setup.py install -O1 --skip-build --root %{buildroot}
+popd
+%endif
%{__python} setup.py install -O1 --skip-build --root %{buildroot}
+%check
+%if 0%{with_python3}
+pushd %{py3dir}
+ %{_bindir}/nosetests-3* -v
+popd
+%endif
+%{_bindir}/nosetests-2* -v
%files
%doc README.rst COPYING
%{python_sitelib}/%{pypi_name}/
%{python_sitelib}/%{pypi_name}-%{version}-py?.?.egg-info
+%if 0%{with_python3}
+%files -n python3-%{pypi_name}
+%doc README.rst COPYING
+%{python3_sitelib}/%{pypi_name}/
+%{python3_sitelib}/%{pypi_name}-%{version}-py?.?.egg-info
+%endif
+
%changelog
+* Thu Oct 17 2013 Thomas Spura <tomspur@fedoraproject.org> - 2.0.0-2
+- add python3 subpackage
+- add %%check
+
* Fri Aug 16 2013 Alan Pevec <apevec@redhat.com> 2.0.0-1
- Update to 2.0.0 release
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=178150855869.1.14289208343800871681.rpms-python-jsonschema-83756b6157f7@fedoraproject.org \
--to=thomas.spura@gmail.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