New release 1.4.0 for Python 3.6, change py2 package name
This commit is contained in:
parent
1df2084166
commit
a13a3aa752
1
.gitignore
vendored
1
.gitignore
vendored
@ -10,3 +10,4 @@
|
|||||||
/sure-1.2.5.tar.gz
|
/sure-1.2.5.tar.gz
|
||||||
/sure-1.2.7-tests.tgz
|
/sure-1.2.7-tests.tgz
|
||||||
/sure-1.2.7.tar.gz
|
/sure-1.2.7.tar.gz
|
||||||
|
/sure-1.4.0.tar.gz
|
||||||
|
19
COPYING
19
COPYING
@ -1,19 +0,0 @@
|
|||||||
Copyright (C) <2010> Gabriel Falcão <gabriel@nacaolivre.org>
|
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
||||||
of this software and associated documentation files (the "Software"), to deal
|
|
||||||
in the Software without restriction, including without limitation the rights
|
|
||||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
||||||
copies of the Software, and to permit persons to whom the Software is
|
|
||||||
furnished to do so, subject to the following conditions:
|
|
||||||
|
|
||||||
The above copyright notice and this permission notice shall be included in
|
|
||||||
all copies or substantial portions of the Software.
|
|
||||||
|
|
||||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
||||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
||||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
||||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
||||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
||||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
||||||
THE SOFTWARE.
|
|
@ -18,21 +18,16 @@
|
|||||||
%endif
|
%endif
|
||||||
%global pypi_name sure
|
%global pypi_name sure
|
||||||
|
|
||||||
|
%global sum Utility belt for automated testing in Python
|
||||||
|
|
||||||
Name: %{?scl_prefix}python-%{pypi_name}
|
Name: %{?scl_prefix}python-%{pypi_name}
|
||||||
Version: 1.2.7
|
Version: 1.4.0
|
||||||
Release: 6%{?dist}
|
Release: 1%{?dist}
|
||||||
Summary: Assertion toolbox for python
|
Summary: %{sum}
|
||||||
|
|
||||||
License: GPLv3+
|
License: GPLv3+
|
||||||
URL: https://github.com/gabrielfalcao/sure
|
URL: https://github.com/gabrielfalcao/sure
|
||||||
Source0: http://pypi.python.org/packages/source/s/%{pypi_name}/%{pypi_name}-%{version}.tar.gz
|
Source0: https://files.pythonhosted.org/packages/source/s/%{pypi_name}/%{pypi_name}-%{version}.tar.gz
|
||||||
# Already asked upstream to include COPYING in the source tar:
|
|
||||||
# https://github.com/gabrielfalcao/sure/issues/17
|
|
||||||
Source1: https://raw.github.com/gabrielfalcao/sure/master/COPYING
|
|
||||||
# To get tests:
|
|
||||||
# git clone https://github.com/gabrielfalcao/sure.git && cd sure
|
|
||||||
# git checkout 9fe8fd0 && tar czf sure-1.2.7-tests.tgz tests/
|
|
||||||
Source2: %{pypi_name}-%{version}-tests.tgz
|
|
||||||
BuildArch: noarch
|
BuildArch: noarch
|
||||||
|
|
||||||
BuildRequires: %{?scl_prefix}python2-devel
|
BuildRequires: %{?scl_prefix}python2-devel
|
||||||
@ -51,23 +46,32 @@ BuildRequires: %{?scl_prefix}python3-six
|
|||||||
%endif
|
%endif
|
||||||
|
|
||||||
%description
|
%description
|
||||||
A Python assertion toolbox that works fine with nose.
|
A testing library for Python with powerful and flexible assertions. Sure is
|
||||||
|
heavily inspired by should.js.
|
||||||
|
|
||||||
|
%package -n python2-%{pypi_name}
|
||||||
|
Summary: %{sum} 2
|
||||||
|
%{?python_provide:%python_provide python2-%{pypi_name}}
|
||||||
|
|
||||||
|
%description -n python2-%{pypi_name}
|
||||||
|
A testing library for Python with powerful and flexible assertions. Sure is
|
||||||
|
heavily inspired by should.js.
|
||||||
|
|
||||||
%if 0%{?with_python3}
|
%if 0%{?with_python3}
|
||||||
%package -n python3-%{pypi_name}
|
%package -n python3-%{pypi_name}
|
||||||
Summary: Assertion toolbox for python 3
|
Summary: %{sum} 3
|
||||||
|
%{?python_provide:%python_provide python3-%{pypi_name}}
|
||||||
Requires: %{?scl_prefix}python3-six
|
Requires: %{?scl_prefix}python3-six
|
||||||
|
|
||||||
%description -n python3-%{pypi_name}
|
%description -n python3-%{pypi_name}
|
||||||
A Python assertion toolbox that works fine with nose.
|
A testing library for Python with powerful and flexible assertions. Sure is
|
||||||
|
heavily inspired by should.js.
|
||||||
%endif # with_python3
|
%endif # with_python3
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -q -n %{pypi_name}-%{version}
|
%setup -q -n %{pypi_name}-%{version}
|
||||||
# Remove bundled egg-info
|
# Remove bundled egg-info
|
||||||
rm -rf %{pypi_name}.egg-info
|
rm -rf %{pypi_name}.egg-info
|
||||||
cp %{SOURCE1} .
|
|
||||||
tar xzf %{SOURCE2}
|
|
||||||
|
|
||||||
%if 0%{?with_python3}
|
%if 0%{?with_python3}
|
||||||
rm -rf %{py3dir}
|
rm -rf %{py3dir}
|
||||||
@ -77,41 +81,41 @@ find %{py3dir} -name '*.py' | xargs sed -i '1s|^#!/bin/env python|#!%{__python3}
|
|||||||
|
|
||||||
%build
|
%build
|
||||||
%{?scl:scl enable %{scl} "}
|
%{?scl:scl enable %{scl} "}
|
||||||
%{__python} setup.py build
|
%py2_build
|
||||||
%{?scl:"}
|
%{?scl:"}
|
||||||
|
|
||||||
%if 0%{with_python3}
|
%if 0%{with_python3}
|
||||||
pushd %{py3dir}
|
pushd %{py3dir}
|
||||||
LANG=en_US.utf8 %{__python3} setup.py build
|
LANG=en_US.utf8 %py3_build
|
||||||
popd
|
popd
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
%install
|
%install
|
||||||
%{?scl:scl enable %{scl} "}
|
%{?scl:scl enable %{scl} "}
|
||||||
%{__python} setup.py install --skip-build --root %{buildroot}
|
%py2_install
|
||||||
%{?scl:"}
|
%{?scl:"}
|
||||||
|
|
||||||
%if 0%{?with_python3}
|
%if 0%{?with_python3}
|
||||||
pushd %{py3dir}
|
pushd %{py3dir}
|
||||||
LANG=en_US.utf8 %{__python3} setup.py install --skip-build --root %{buildroot}
|
LANG=en_US.utf8 %py3_install
|
||||||
popd
|
popd
|
||||||
%endif # with_python3
|
%endif # with_python3
|
||||||
|
|
||||||
%check
|
%check
|
||||||
%{?scl:scl enable %{scl} "}
|
%{?scl:scl enable %{scl} "}
|
||||||
nosetests
|
%{__python2} setup.py test
|
||||||
%{?scl:"}
|
%{?scl:"}
|
||||||
|
|
||||||
%if 0%{?with_python3}
|
%if 0%{?with_python3}
|
||||||
pushd %{py3dir}
|
pushd %{py3dir}
|
||||||
/usr/bin/nosetests-3*
|
%{__python3} setup.py test
|
||||||
popd
|
popd
|
||||||
%endif # with_python3
|
%endif # with_python3
|
||||||
|
|
||||||
%files
|
%files -n python2-%{pypi_name}
|
||||||
%doc COPYING
|
%doc COPYING
|
||||||
%{python_sitelib}/%{pypi_name}
|
%{python2_sitelib}/%{pypi_name}
|
||||||
%{python_sitelib}/%{pypi_name}-%{version}-py?.?.egg-info
|
%{python2_sitelib}/%{pypi_name}-%{version}-py?.?.egg-info
|
||||||
|
|
||||||
%if 0%{?with_python3}
|
%if 0%{?with_python3}
|
||||||
%files -n python3-%{pypi_name}
|
%files -n python3-%{pypi_name}
|
||||||
@ -121,6 +125,12 @@ popd
|
|||||||
%endif
|
%endif
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Wed Dec 21 2016 Adam Williamson <awilliam@redhat.com> - 1.4.0-1
|
||||||
|
- New release 1.4.0 (builds against Python 3.6)
|
||||||
|
- Drop sources merged upstream
|
||||||
|
- Modernize spec a bit (use modern macros)
|
||||||
|
- Rename python2 package to python2-sure
|
||||||
|
|
||||||
* Mon Dec 19 2016 Miro Hrončok <mhroncok@redhat.com> - 1.2.7-6
|
* Mon Dec 19 2016 Miro Hrončok <mhroncok@redhat.com> - 1.2.7-6
|
||||||
- Rebuild for Python 3.6
|
- Rebuild for Python 3.6
|
||||||
|
|
||||||
|
3
sources
3
sources
@ -1,2 +1 @@
|
|||||||
1a270f3313f6078cf117f7240c5fc997 sure-1.2.7-tests.tgz
|
SHA512 (sure-1.4.0.tar.gz) = a68b18e1d13f0b008184812b8b11041fbcaaf7c22cf7f62542ad73eeb816af96af7881f758eaa960d2348f75d1b00359aee30867699e366667135a389433dcd9
|
||||||
6dbecef27dffc41c8cd8aab8a8b3fdfb sure-1.2.7.tar.gz
|
|
||||||
|
@ -1,82 +0,0 @@
|
|||||||
From 0dbf5a5d4e82afeb7ac379b2e470b46c119285be Mon Sep 17 00:00:00 2001
|
|
||||||
From: Jamie Lennox <jamielennox@redhat.com>
|
|
||||||
Date: Mon, 31 Mar 2014 11:27:17 +1000
|
|
||||||
Subject: [PATCH] Handle setup.py dependencies separate to requirements.txt
|
|
||||||
|
|
||||||
The usage of these two files is very different and setup.py should not
|
|
||||||
have the strict version requirements that requirements.txt does
|
|
||||||
otherwise we create dependency problems for packagers and people using
|
|
||||||
the library.
|
|
||||||
|
|
||||||
Also changes the existing dependencies from install requirements to test
|
|
||||||
requirements and registered nose as the test handler in setup.py.
|
|
||||||
|
|
||||||
Fixes Issue #56
|
|
||||||
---
|
|
||||||
setup.py | 35 +++--------------------------------
|
|
||||||
1 file changed, 3 insertions(+), 32 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/setup.py b/setup.py
|
|
||||||
index 3b97afb..8b81d53 100755
|
|
||||||
--- a/setup.py
|
|
||||||
+++ b/setup.py
|
|
||||||
@@ -18,7 +18,6 @@
|
|
||||||
|
|
||||||
import ast
|
|
||||||
import os
|
|
||||||
-import re
|
|
||||||
from setuptools import setup, find_packages
|
|
||||||
|
|
||||||
|
|
||||||
@@ -42,39 +41,11 @@ def read_version():
|
|
||||||
return finder.version
|
|
||||||
|
|
||||||
|
|
||||||
-def parse_requirements(path):
|
|
||||||
- """Rudimentary parser for the `requirements.txt` file
|
|
||||||
-
|
|
||||||
- We just want to separate regular packages from links to pass them to the
|
|
||||||
- `install_requires` and `dependency_links` params of the `setup()`
|
|
||||||
- function properly.
|
|
||||||
- """
|
|
||||||
- try:
|
|
||||||
- requirements = map(str.strip, local_file(path).splitlines())
|
|
||||||
- except IOError:
|
|
||||||
- raise RuntimeError("Couldn't find the `requirements.txt' file :(")
|
|
||||||
-
|
|
||||||
- links = []
|
|
||||||
- pkgs = []
|
|
||||||
- for req in requirements:
|
|
||||||
- if not req:
|
|
||||||
- continue
|
|
||||||
- if 'http:' in req or 'https:' in req:
|
|
||||||
- links.append(req)
|
|
||||||
- name, version = re.findall("\#egg=([^\-]+)-(.+$)", req)[0]
|
|
||||||
- pkgs.append('{0}=={1}'.format(name, version))
|
|
||||||
- else:
|
|
||||||
- pkgs.append(req)
|
|
||||||
-
|
|
||||||
- return pkgs, links
|
|
||||||
-
|
|
||||||
-
|
|
||||||
local_file = lambda *f: \
|
|
||||||
open(os.path.join(os.path.dirname(__file__), *f)).read()
|
|
||||||
|
|
||||||
|
|
||||||
-install_requires, dependency_links = \
|
|
||||||
- parse_requirements('requirements.txt')
|
|
||||||
+tests_require = ['nose']
|
|
||||||
|
|
||||||
|
|
||||||
if __name__ == '__main__':
|
|
||||||
@@ -87,6 +58,6 @@ def parse_requirements(path):
|
|
||||||
include_package_data=True,
|
|
||||||
url='http://github.com/gabrielfalcao/sure',
|
|
||||||
packages=find_packages(exclude=['*tests*']),
|
|
||||||
- install_requires=install_requires,
|
|
||||||
- dependency_links=dependency_links,
|
|
||||||
+ tests_require=tests_require,
|
|
||||||
+ test_suite='nose.collector',
|
|
||||||
)
|
|
||||||
--
|
|
||||||
1.8.5.5
|
|
Loading…
Reference in New Issue
Block a user