Control: tags -1 + patch
* Dmitry Shachnev <mity...@debian.org>, 2021-10-24, 16:24:
setuptools v58.0.0 removed support for 2to3 during builds,
which nose relied on (because it has a Python 2 codebase).
You can convert the source to be compatible with Python 3 with these
commands:
patch -p1 unit_tests/test_issue_100.rst <
unit_tests/test_issue_100.rst.py3.patch
2to3 -wn .
find -name '*.rst' | xargs 2to3 -dwn
Then you need a few small changes (see the attached patches) to stop
the build system from trying to run 2to3 stuff again at build time.
--
Jakub Wilk
--- a/selftest.py
+++ b/selftest.py
@@ -32,7 +32,7 @@ if __name__ == "__main__":
this_dir = os.path.normpath(os.path.abspath(os.path.dirname(__file__)))
lib_dirs = [this_dir]
test_dir = this_dir
- if sys.version_info >= (3,):
+ if False:
# Under Python 3.x, we need to 'build' the source (using 2to3, etc)
# first. 'python3 setup.py build_tests' will put everything under
# build/tests (including nose itself, since some tests are inside the
--- a/setup.py
+++ b/setup.py
@@ -6,7 +6,7 @@ py_vers_tag = '-%s.%s' % sys.version_inf
test_dirs = ['functional_tests', 'unit_tests', os.path.join('doc','doc_tests'), 'nose']
-if sys.version_info >= (3,):
+if False:
import setuptools
extra = {'use_2to3': True,
--- a/setup3lib.py
+++ b/setup3lib.py
@@ -3,7 +3,7 @@ from setuptools import setup as _setup
py3_args = ['use_2to3', 'convert_2to3_doctests', 'use_2to3_fixers', 'test_dirs', 'test_build_dir', 'doctest_exts', 'pyversion_patching']
-if sys.version_info < (3,):
+if True:
# Remove any Python-3.x-only arguments (so they don't generate complaints
# from 2.x setuptools) and then just pass through to the regular setup
# routine.
--- a/setup.cfg
+++ b/setup.cfg
@@ -2,7 +2,6 @@
with-doctest = 1
doctest-extension = .rst
doctest-fixtures = _fixtures
-py3where = build/tests
[bdist_rpm]
doc_files = README.txt
diff -Nru nose-1.3.7/debian/clean nose-1.3.7/debian/clean
--- nose-1.3.7/debian/clean 2020-07-17 22:44:16.000000000 +0200
+++ nose-1.3.7/debian/clean 2021-10-25 18:14:56.000000000 +0200
@@ -6,3 +6,4 @@
functional_tests/support/xunit.xml
nose.egg-info/
unit_tests/support/doctest/noname_wrapped.not_pyc
+functional_tests/support/issue408/.coverage
diff -Nru nose-1.3.7/debian/rules nose-1.3.7/debian/rules
--- nose-1.3.7/debian/rules 2020-07-17 22:44:16.000000000 +0200
+++ nose-1.3.7/debian/rules 2021-10-25 18:14:56.000000000 +0200
@@ -3,7 +3,7 @@
DESTDIR3 := $(CURDIR)/debian/python3-nose
export PYBUILD_NAME = nose
-export PYBUILD_TEST_ARGS_python3 = {interpreter} setup.py build_tests && {interpreter} selftest.py -v
+export PYBUILD_TEST_ARGS_python3 = {interpreter} setup.py egg_info && {interpreter} selftest.py -v
BUILDDIR3 := $(shell pybuild --print build_dir --interpreter python3)