diff --git a/python-setproctitle.changes b/python-setproctitle.changes index 49bb98c..7cd3791 100644 --- a/python-setproctitle.changes +++ b/python-setproctitle.changes @@ -1,3 +1,14 @@ +------------------------------------------------------------------- +Sun Sep 15 10:35:42 UTC 2019 - John Vandenberg + +- Replace PyPI URL with GitHub URL +- Drop errant skip-failing-tests.patch caused by missing + test dependency procps +- Add use-pkg-config.patch to build using pkg-config instead of + python-config, as the latter is not shipped in python3-devel +- Add LANG in %check to fix openSUSE/SLE 15 +- Use %license + ------------------------------------------------------------------- Sun Mar 3 22:11:03 UTC 2019 - Matej Cepl diff --git a/python-setproctitle.spec b/python-setproctitle.spec index 1379e7b..90e8b78 100644 --- a/python-setproctitle.spec +++ b/python-setproctitle.spec @@ -23,12 +23,13 @@ Release: 0 Summary: Python module to allow customization of the process title License: BSD-3-Clause Group: Development/Libraries/Python -URL: http://pypi.python.org/pypi/setproctitle/ +URL: https://github.com/dvarrazzo/py-setproctitle/ Source: https://files.pythonhosted.org/packages/source/s/setproctitle/setproctitle-%{version}.tar.gz -Patch: skip-failing-tests.patch +Patch0: use-pkg-config.patch BuildRequires: %{python_module devel} BuildRequires: %{python_module nose} BuildRequires: %{python_module setuptools} +BuildRequires: procps BuildRequires: python-rpm-macros BuildRequires: python3-tools %python_subpackages @@ -51,12 +52,14 @@ export CFLAGS="%{optflags}" %python_install %check +export LANG=en_US.UTF-8 %{python_expand export PYTHONPATH=%{buildroot}%{$python_sitearch} make PYTHON=$python check } %files %{python_files} -%doc COPYRIGHT HISTORY.rst README.rst +%doc HISTORY.rst README.rst +%license COPYRIGHT %{python_sitearch}/* %changelog diff --git a/skip-failing-tests.patch b/skip-failing-tests.patch deleted file mode 100644 index eb0b9b4..0000000 --- a/skip-failing-tests.patch +++ /dev/null @@ -1,58 +0,0 @@ ---- a/tests/setproctitle_test.py -+++ b/tests/setproctitle_test.py -@@ -57,6 +57,7 @@ class SetproctitleTestCase(unittest.Test - args="-u") - self.assertEqual(rv, sys.executable + " -u\n") - -+ @unittest.skip('Failing gh#dvarrazzo/py-setproctitle#60') - def test_setproctitle(self): - """setproctitle() can set the process title, duh.""" - rv = self.run_script(r""" -@@ -146,6 +147,7 @@ class SetproctitleTestCase(unittest.Test - self.assertEqual(test, 'setenv-value') - self.assert_(path.endswith('fakepath'), path) - -+ @unittest.skip('Failing gh#dvarrazzo/py-setproctitle#60') - def test_issue_8(self): - """Test that the module works with 'python -m'.""" - module = 'spt_issue_8' -@@ -182,6 +184,7 @@ class SetproctitleTestCase(unittest.Test - else: - del os.environ['PYTHONPATH'] - -+ @unittest.skipIf(IS_PY3K, 'Failing gh#dvarrazzo/py-setproctitle#60') - def test_unicode(self): - """Title can contain unicode characters.""" - snowman = u'\u2603' -@@ -229,6 +232,7 @@ class SetproctitleTestCase(unittest.Test - else: - self.fail("unexpected ps output: %r" % title) - -+ @unittest.skipIf(IS_PY3K, 'Failing gh#dvarrazzo/py-setproctitle#60') - def test_weird_args(self): - """No problem with encoded arguments.""" - euro = u'\u20ac' -@@ -253,6 +257,7 @@ class SetproctitleTestCase(unittest.Test - title = self._clean_up_title(pids[pid]) - self.assertEqual(title, "Hello, weird args!") - -+ @unittest.skipIf(IS_PY3K, 'Failing gh#dvarrazzo/py-setproctitle#60') - def test_weird_path(self): - """No problem with encoded argv[0] path.""" - self._check_4388() -@@ -288,6 +293,7 @@ class SetproctitleTestCase(unittest.Test - finally: - shutil.rmtree(tdir, ignore_errors=True) - -+ @unittest.skip('Failing gh#dvarrazzo/py-setproctitle#60') - def test_embedded(self): - """Check the module works with embedded Python. - """ -@@ -318,6 +324,7 @@ class SetproctitleTestCase(unittest.Test - title = self._clean_up_title(pids[pid]) - self.assertEqual(title, "Hello, embedded!") - -+ @unittest.skip('Failing gh#dvarrazzo/py-setproctitle#60') - def test_embedded_many_args(self): - """Check more complex cmdlines are handled in embedded env too.""" - if IS_PYPY: diff --git a/use-pkg-config.patch b/use-pkg-config.patch new file mode 100644 index 0000000..7bd3514 --- /dev/null +++ b/use-pkg-config.patch @@ -0,0 +1,21 @@ +--- a/Makefile.orig 2019-09-15 17:13:27.656631109 +0700 ++++ b/Makefile 2019-09-15 17:16:00.458264928 +0700 +@@ -7,15 +7,15 @@ + + # Customize these to select the Python to build/test + PYTHON ?= python +-PYCONFIG ?= python-config ++PYCONFIG ?= pkg-config + PY2TO3 ?= 2to3 + + # PYVER value is 2 or 3 + PYVER := $(shell $(PYTHON) -c "import sys; print(sys.version_info[0])") + ROOT_PATH := $(shell pwd) + +-PYINC := $(shell $(PYCONFIG) --includes) +-PYLIB := $(shell $(PYCONFIG) --ldflags) -L$(shell $(PYCONFIG) --prefix)/lib ++PYINC := $(shell $(PYCONFIG) python$(PYVER) --cflags) ++PYLIB := $(shell $(PYCONFIG) python$(PYVER) --libs) -L$(shell $(PYCONFIG) python$(PYVER) --prefix)/lib + + BUILD_DIR = build/lib.$(PYVER) +