Bug 1205170
| Summary: | python 3 package for python-uri-templates | ||||||||
|---|---|---|---|---|---|---|---|---|---|
| Product: | [Fedora] Fedora | Reporter: | Oskari Saarenmaa <oskari> | ||||||
| Component: | python-uri-templates | Assignee: | Ankur Sinha (FranciscoD) <sanjay.ankur> | ||||||
| Status: | CLOSED RAWHIDE | QA Contact: | Fedora Extras Quality Assurance <extras-qa> | ||||||
| Severity: | unspecified | Docs Contact: | |||||||
| Priority: | unspecified | ||||||||
| Version: | 22 | CC: | michele, sanjay.ankur | ||||||
| Target Milestone: | --- | ||||||||
| Target Release: | --- | ||||||||
| Hardware: | Unspecified | ||||||||
| OS: | Unspecified | ||||||||
| Whiteboard: | |||||||||
| Fixed In Version: | Doc Type: | Bug Fix | |||||||
| Doc Text: | Story Points: | --- | |||||||
| Clone Of: | Environment: | ||||||||
| Last Closed: | 2015-06-23 14:27:12 UTC | Type: | Bug | ||||||
| Regression: | --- | Mount Type: | --- | ||||||
| Documentation: | --- | CRM: | |||||||
| Verified Versions: | Category: | --- | |||||||
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||||
| Cloudforms Team: | --- | Target Upstream Version: | |||||||
| Embargoed: | |||||||||
| Bug Depends On: | |||||||||
| Bug Blocks: | 989068 | ||||||||
| Attachments: |
|
||||||||
Created attachment 1035973 [details] Updated spec file Here is an updated spec file. Here is the diff to the one currently in Fedora: diff --git a/python-uri-templates.spec b/python-uri-templates.spec index fdcd8014e190..fb99c8478fb4 100644 --- a/python-uri-templates.spec +++ b/python-uri-templates.spec @@ -1,36 +1,68 @@ -%global commit e947a8affa793f24cd3526a1d18f21e0729672da -%global shortcommit %(c=%{commit}; echo ${c:0:7}) +%if 0%{?fedora} +%bcond_without python3 +%else +%bcond_with python3 +%endif Name: python-uri-templates -Version: 0.5.2 -Release: 2%{?dist} -Summary: A Python implementation of URI Template +Version: 0.6 +Release: 1%{?dist} +Summary: A Python implementation of URI Templates License: ASL 2.0 URL: https://github.com/uri-templates/uritemplate-py -Source0: https://github.com/uri-templates/uritemplate-py/archive/%{commit}/%{name}-%{version}-%{shortcommit}.tar.gz +Source0: https://github.com/uri-templates/uritemplate-py/archive/uri-template-py-%{version}.tar.gz BuildArch: noarch BuildRequires: python2-devel BuildRequires: python-setuptools -Requires: python-simplejson +BuildRequires: pytest +%if %{with python3} +BuildRequires: python3-setuptools +BuildRequires: python3-devel +BuildRequires: python3-pytest +%endif + +Requires: python-simplejson %description This is a Python implementation of RFC6570, URI Template, and can expand templates up to and including Level 4 in that specification. +%if %{with python3} +%package -n python3-uri-templates +Summary: A Python 3 implementation of URI Templates + +Requires: python3-simplejson + +%description -n python3-uri-templates +This is a python 3 client module for accessing resources protected by OAuth 2.0 +%endif + %prep -%setup -q -n uritemplate-py-%{commit} +%setup -q -n uritemplate-py-uri-template-py-%{version} # Remove shebang -sed -i "1 d" uritemplate/uritemplate.py +sed -i "1 d" uritemplate/__init__.py %build -%{__python} setup.py build +%{__python2} setup.py build +%if %{with python3} +%{__python3} setup.py build +%endif + +%check +%{__python2} -m pytest test/variables_test.py +%if %{with python3} +%{__python3} -m pytest test/variables_test.py +%endif %install -%{__python} setup.py install -O1 --skip-build --root $RPM_BUILD_ROOT +%{__python2} setup.py install -O1 --skip-build --root %{buildroot} +%if %{with python3} +%{__python3} setup.py install --skip-build --root %{buildroot} +%endif # tests are a separate repository? @@ -39,8 +71,20 @@ sed -i "1 d" uritemplate/uritemplate.py %{python_sitelib}/uritemplate-%{version}-py?.?.egg-info %{python_sitelib}/uritemplate/ +%if %{with python3} +%files -n python3-uri-templates +%doc README.rst +%{python3_sitelib}/uritemplate/ +%{python3_sitelib}/uritemplate-%{version}-py?.?.egg-info +%endif + %changelog +* Sat Jun 06 2015 Michele Baldessari <michele> - 0.6-1 +- New upstream +- Add python3 subpackage +- Add check step + * Sun Jun 08 2014 Fedora Release Engineering <rel-eng.org> - 0.5.2-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild This passes fedora-review and rpmlint tests Fixed in RAWHIDE |
Created attachment 1005802 [details] spec file with python3 support Description of problem: python-uri-templates doesn't have a python 3 version and the python 2 package uses a rather old version. Version 0.6 which added support for Python 3 was released in 2013, please update to it and build a Python 3 package. It's needed for the Google Python API client. Attached the spec file I used to build a python 3 package myself.