Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] 58.0.0: build fails with "AttributeError: type object 'Distribution' has no attribute '_finalize_2to3_doctests'" #2765

Closed
1 task done
kloczek opened this issue Sep 5, 2021 · 11 comments · Fixed by #2768
Labels
bug Needs Triage Issues that need to be evaluated for severity and status.

Comments

@kloczek
Copy link

kloczek commented Sep 5, 2021

setuptools version

58.0.0

Python version

3.8.12

OS

Linux/x86_64

Additional environment information

build version 0.6.0

Description

With setuptools I was able to use build procedure consisting from:

  • python3 -m build --no-isolation --wheel
  • generate egg_info by python3 setup.py egg_info
  • generate man pages using setuptools<>sphinx integration

In new version that procedure fails on first step.

Expected behavior

build should produce .whl file.

How to Reproduce

  • unpack git tagged tar ball
  • execute SETUPTOOLS_SCM_PRETEND_VERSION=58.0.0 python3 -m build --no-isolation --wheel

Output

+ cd setuptools-58.0.0
+ SETUPTOOLS_SCM_PRETEND_VERSION=58.0.0
+ /usr/bin/python3 -m build --no-isolation --wheel
* Getting dependencies for wheel...
Traceback (most recent call last):
  File "/home/tkloczko/rpmbuild/BUILD/setuptools-58.0.0/pkg_resources/__init__.py", line 2458, in resolve
    return functools.reduce(getattr, self.attrs, module)
AttributeError: type object 'Distribution' has no attribute '_finalize_2to3_doctests'

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/usr/lib/python3.8/site-packages/pep517/in_process/_in_process.py", line 349, in <module>
    main()
  File "/usr/lib/python3.8/site-packages/pep517/in_process/_in_process.py", line 331, in main
    json_out['return_val'] = hook(**hook_input['kwargs'])
  File "/usr/lib/python3.8/site-packages/pep517/in_process/_in_process.py", line 117, in get_requires_for_build_wheel
    return hook(config_settings)
  File "/home/tkloczko/rpmbuild/BUILD/setuptools-58.0.0/setuptools/build_meta.py", line 154, in get_requires_for_build_wheel
    return self._get_build_requires(
  File "/home/tkloczko/rpmbuild/BUILD/setuptools-58.0.0/setuptools/build_meta.py", line 135, in _get_build_requires
    self.run_setup()
  File "/home/tkloczko/rpmbuild/BUILD/setuptools-58.0.0/setuptools/build_meta.py", line 150, in run_setup
    exec(compile(code, __file__, 'exec'), locals())
  File "setup.py", line 87, in <module>
    dist = setuptools.setup(**setup_params)
  File "/home/tkloczko/rpmbuild/BUILD/setuptools-58.0.0/setuptools/__init__.py", line 153, in setup
    return distutils.core.setup(**attrs)
  File "/usr/lib64/python3.8/distutils/core.py", line 108, in setup
    _setup_distribution = dist = klass(attrs)
  File "/home/tkloczko/rpmbuild/BUILD/setuptools-58.0.0/setuptools/dist.py", line 446, in __init__
    _Distribution.__init__(
  File "/usr/lib64/python3.8/distutils/dist.py", line 292, in __init__
    self.finalize_options()
  File "/home/tkloczko/rpmbuild/BUILD/setuptools-58.0.0/setuptools/dist.py", line 821, in finalize_options
    for ep in sorted(eps, key=by_order):
  File "/home/tkloczko/rpmbuild/BUILD/setuptools-58.0.0/setuptools/dist.py", line 820, in <lambda>
    eps = map(lambda e: e.load(), pkg_resources.iter_entry_points(group))
  File "/home/tkloczko/rpmbuild/BUILD/setuptools-58.0.0/pkg_resources/__init__.py", line 2450, in load
    return self.resolve()
  File "/home/tkloczko/rpmbuild/BUILD/setuptools-58.0.0/pkg_resources/__init__.py", line 2460, in resolve
    raise ImportError(str(exc)) from exc
ImportError: type object 'Distribution' has no attribute '_finalize_2to3_doctests'

ERROR Backend subproccess exited when trying to invoke get_requires_for_build_wheel

Code of Conduct

  • I agree to follow the PSF Code of Conduct
@kloczek kloczek added bug Needs Triage Issues that need to be evaluated for severity and status. labels Sep 5, 2021
@kloczek kloczek changed the title [BUG] 58.0.0: `build fails with "AttributeError: type object 'Distribution' has no attribute '_finalize_2to3_doctests'" [BUG] 58.0.0: build fails with "AttributeError: type object 'Distribution' has no attribute '_finalize_2to3_doctests'" Sep 5, 2021
@jaraco
Copy link
Member

jaraco commented Sep 6, 2021

That error occurs when there is metadata left over from or found in an older version of Setuptools.

@jaraco
Copy link
Member

jaraco commented Sep 6, 2021

I'm able to replicate the issue by ensuring that an older Setuptools is present on the path and then running the build command:

setuptools main $ pip-run -q build wheel 'setuptools<58' -- -m build --no-isolation --wheel
* Getting dependencies for wheel...
Traceback (most recent call last):
  File "/Users/jaraco/code/public/pypa/setuptools/pkg_resources/__init__.py", line 2458, in resolve
    return functools.reduce(getattr, self.attrs, module)
AttributeError: type object 'Distribution' has no attribute '_finalize_2to3_doctests'

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/var/folders/c6/v7hnmq453xb6p2dbz1gqc6rr0000gn/T/pip-run-axcfpfsg/pep517/in_process/_in_process.py", line 349, in <module>
    main()
  File "/var/folders/c6/v7hnmq453xb6p2dbz1gqc6rr0000gn/T/pip-run-axcfpfsg/pep517/in_process/_in_process.py", line 331, in main
    json_out['return_val'] = hook(**hook_input['kwargs'])
  File "/var/folders/c6/v7hnmq453xb6p2dbz1gqc6rr0000gn/T/pip-run-axcfpfsg/pep517/in_process/_in_process.py", line 117, in get_requires_for_build_wheel
    return hook(config_settings)
  File "/Users/jaraco/code/public/pypa/setuptools/setuptools/build_meta.py", line 154, in get_requires_for_build_wheel
    return self._get_build_requires(
  File "/Users/jaraco/code/public/pypa/setuptools/setuptools/build_meta.py", line 135, in _get_build_requires
    self.run_setup()
  File "/Users/jaraco/code/public/pypa/setuptools/setuptools/build_meta.py", line 150, in run_setup
    exec(compile(code, __file__, 'exec'), locals())
  File "setup.py", line 87, in <module>
    dist = setuptools.setup(**setup_params)
  File "/Users/jaraco/code/public/pypa/setuptools/setuptools/__init__.py", line 153, in setup
    return distutils.core.setup(**attrs)
  File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/distutils/core.py", line 108, in setup
    _setup_distribution = dist = klass(attrs)
  File "/Users/jaraco/code/public/pypa/setuptools/setuptools/dist.py", line 446, in __init__
    _Distribution.__init__(
  File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/distutils/dist.py", line 292, in __init__
    self.finalize_options()
  File "/Users/jaraco/code/public/pypa/setuptools/setuptools/dist.py", line 821, in finalize_options
    for ep in sorted(eps, key=by_order):
  File "/Users/jaraco/code/public/pypa/setuptools/setuptools/dist.py", line 820, in <lambda>
    eps = map(lambda e: e.load(), pkg_resources.iter_entry_points(group))
  File "/Users/jaraco/code/public/pypa/setuptools/pkg_resources/__init__.py", line 2450, in load
    return self.resolve()
  File "/Users/jaraco/code/public/pypa/setuptools/pkg_resources/__init__.py", line 2460, in resolve
    raise ImportError(str(exc)) from exc
ImportError: type object 'Distribution' has no attribute '_finalize_2to3_doctests'

ERROR Backend subproccess exited when trying to invoke get_requires_for_build_wheel

In fact, I encountered this error in the release. I worked around it by cutting the release locally in an environment without an existing Setuptools.

The problem goes away once one build succeeds, because then the metadata for the local build is present and takes precedence.

@jaraco
Copy link
Member

jaraco commented Sep 6, 2021

Interestingly, and somewhat surprisingly, the issue also occurs with isolated builds.

setuptools main $ pip-run -q build 'setuptools<58' -- -m build --wheel
* Creating venv isolated environment...
* Installing packages in isolated environment... (wheel)
* Getting dependencies for wheel...
Traceback (most recent call last):
  File "/Users/jaraco/code/public/pypa/setuptools/pkg_resources/__init__.py", line 2458, in resolve
    return functools.reduce(getattr, self.attrs, module)
AttributeError: type object 'Distribution' has no attribute '_finalize_2to3_doctests'

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/var/folders/c6/v7hnmq453xb6p2dbz1gqc6rr0000gn/T/pip-run-_2f120tf/pep517/in_process/_in_process.py", line 349, in <module>
    main()
  File "/var/folders/c6/v7hnmq453xb6p2dbz1gqc6rr0000gn/T/pip-run-_2f120tf/pep517/in_process/_in_process.py", line 331, in main
    json_out['return_val'] = hook(**hook_input['kwargs'])
  File "/var/folders/c6/v7hnmq453xb6p2dbz1gqc6rr0000gn/T/pip-run-_2f120tf/pep517/in_process/_in_process.py", line 117, in get_requires_for_build_wheel
    return hook(config_settings)
  File "/Users/jaraco/code/public/pypa/setuptools/setuptools/build_meta.py", line 154, in get_requires_for_build_wheel
    return self._get_build_requires(
  File "/Users/jaraco/code/public/pypa/setuptools/setuptools/build_meta.py", line 135, in _get_build_requires
    self.run_setup()
  File "/Users/jaraco/code/public/pypa/setuptools/setuptools/build_meta.py", line 150, in run_setup
    exec(compile(code, __file__, 'exec'), locals())
  File "setup.py", line 87, in <module>
    dist = setuptools.setup(**setup_params)
  File "/Users/jaraco/code/public/pypa/setuptools/setuptools/__init__.py", line 153, in setup
    return distutils.core.setup(**attrs)
  File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/distutils/core.py", line 108, in setup
    _setup_distribution = dist = klass(attrs)
  File "/Users/jaraco/code/public/pypa/setuptools/setuptools/dist.py", line 446, in __init__
    _Distribution.__init__(
  File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/distutils/dist.py", line 292, in __init__
    self.finalize_options()
  File "/Users/jaraco/code/public/pypa/setuptools/setuptools/dist.py", line 821, in finalize_options
    for ep in sorted(eps, key=by_order):
  File "/Users/jaraco/code/public/pypa/setuptools/setuptools/dist.py", line 820, in <lambda>
    eps = map(lambda e: e.load(), pkg_resources.iter_entry_points(group))
  File "/Users/jaraco/code/public/pypa/setuptools/pkg_resources/__init__.py", line 2450, in load
    return self.resolve()
  File "/Users/jaraco/code/public/pypa/setuptools/pkg_resources/__init__.py", line 2460, in resolve
    raise ImportError(str(exc)) from exc
ImportError: type object 'Distribution' has no attribute '_finalize_2to3_doctests'

ERROR Backend subproccess exited when trying to invoke get_requires_for_build_wheel

I'm guessing that's because isolated builds still get a copy of some version of Setuptools (whatever venv bundles). Except no, because if setuptools<58 is not installed into the working environment, the build succeeds.

setuptools main $ pip-run -q build -- -m build --wheel
* Creating venv isolated environment...
* Installing packages in isolated environment... (wheel)
* Getting dependencies for wheel...
running egg_info
creating setuptools.egg-info
writing setuptools.egg-info/PKG-INFO
writing dependency_links to setuptools.egg-info/dependency_links.txt
writing entry points to setuptools.egg-info/entry_points.txt
writing requirements to setuptools.egg-info/requires.txt
writing manifest file 'setuptools.egg-info/SOURCES.txt'
package init file 'setuptools/tests/indexes/__init__.py' not found (or not a regular file)
package init file 'setuptools/tests/indexes/test_links_priority/__init__.py' not found (or not a regular file)
package init file 'setuptools/tests/indexes/test_links_priority/simple/__init__.py' not found (or not a regular file)
package init file 'setuptools/tests/indexes/test_links_priority/simple/foobar/__init__.py' not found (or not a regular file)
package init file 'pkg_resources/tests/data/__init__.py' not found (or not a regular file)
...
adding 'setuptools-58.0.0.post20210906.dist-info/top_level.txt'
adding 'setuptools-58.0.0.post20210906.dist-info/RECORD'
removing build/bdist.macosx-10.9-universal2/wheel
Successfully built setuptools-58.0.0.post20210906-py3-none-any.whl

So now I'm suspecting the issue is that by using PYTHONPATH to add setuptools<58 (that's what pip-run does), it gets added to the isolated build environment.

The root cause is that Setuptools (intentionally) removed the entry point in order to remove that behavior, but if the metadata for an older version of Setuptools is present, it takes precedence.

The question I'd like to answer is: how pervasive is the failure and how necessary is a workaround?

I can think of a few possible workarounds:

  • require affected builders to remove old versions of Setuptools before building
  • require affected builders to generate egg-info in an isolated environment before building
  • restore the missing attribute as a no-op
  • specifically exclude this entry point

The first two workarounds have the advantage that they add lasting value (avoiding similar issues in the future), but they have the disadvantage of imposing a burden/constraint on the downstream builders.

The latter two options would provide a widespread workaround but have two disadvantages: it won't improve the situation for future similar changes, and it adds debt that will need to be removed at some unclear point in the future.

I suspect it won't be easy for downstream builders to generally avoid having Setuptools installed, so I'm leaning toward one of the Setuptools-owned workarounds.

@kloczek
Copy link
Author

kloczek commented Sep 6, 2021

Interestingly, and somewhat surprisingly, the issue also occurs with isolated builds.

For me remove --no-isolation solved the issue.

+ /usr/bin/python3 -m build --wheel
* Creating virtualenv isolated environment...
* Installing packages in isolated environment... (wheel)
* Getting dependencies for wheel...
running egg_info
creating setuptools.egg-info
writing setuptools.egg-info/PKG-INFO
writing dependency_links to setuptools.egg-info/dependency_links.txt
writing entry points to setuptools.egg-info/entry_points.txt
writing requirements to setuptools.egg-info/requires.txt
writing manifest file 'setuptools.egg-info/SOURCES.txt'
package init file 'pkg_resources/tests/data/__init__.py' not found (or not a regular file)
package init file 'pkg_resources/tests/data/my-test-package-source/__init__.py' not found (or not a regular file)
package init file 'pkg_resources/tests/data/my-test-package-zip/__init__.py' not found (or not a regular file)
package init file 'pkg_resources/tests/data/my-test-package_unpacked-egg/__init__.py' not found (or not a regular file)
package init file 'pkg_resources/tests/data/my-test-package_zipped-egg/__init__.py' not found (or not a regular file)
package init file 'setuptools/tests/indexes/__init__.py' not found (or not a regular file)
package init file 'setuptools/tests/indexes/test_links_priority/__init__.py' not found (or not a regular file)
package init file 'setuptools/tests/indexes/test_links_priority/simple/__init__.py' not found (or not a regular file)
package init file 'setuptools/tests/indexes/test_links_priority/simple/foobar/__init__.py' not found (or not a regular file)
reading manifest file 'setuptools.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
warning: no files found matching '*.py' under directory 'tests'
warning: no files found matching '*.txt' under directory 'docs'
warning: no files found matching '*.conf' under directory 'docs'
warning: no files found matching '*.css' under directory 'docs'
warning: no files found matching '*.css_t' under directory 'docs'
warning: no files found matching 'Makefile' under directory 'docs'
warning: no files found matching 'indexsidebar.html' under directory 'docs'
adding license file 'LICENSE'
writing manifest file 'setuptools.egg-info/SOURCES.txt'
* Installing packages in isolated environment... (wheel)
* Building wheel...
running bdist_wheel
running build
running build_py
creating build
creating build/lib
creating build/lib/_distutils_hack
copying _distutils_hack/__init__.py -> build/lib/_distutils_hack
copying _distutils_hack/override.py -> build/lib/_distutils_hack
creating build/lib/pkg_resources
copying pkg_resources/__init__.py -> build/lib/pkg_resources
creating build/lib/setuptools
copying setuptools/__init__.py -> build/lib/setuptools
copying setuptools/_deprecation_warning.py -> build/lib/setuptools
copying setuptools/_imp.py -> build/lib/setuptools
copying setuptools/archive_util.py -> build/lib/setuptools
copying setuptools/build_meta.py -> build/lib/setuptools
copying setuptools/config.py -> build/lib/setuptools
copying setuptools/dep_util.py -> build/lib/setuptools
copying setuptools/depends.py -> build/lib/setuptools
copying setuptools/dist.py -> build/lib/setuptools
copying setuptools/errors.py -> build/lib/setuptools
copying setuptools/extension.py -> build/lib/setuptools
copying setuptools/glob.py -> build/lib/setuptools
copying setuptools/installer.py -> build/lib/setuptools
copying setuptools/launch.py -> build/lib/setuptools
copying setuptools/monkey.py -> build/lib/setuptools
copying setuptools/msvc.py -> build/lib/setuptools
copying setuptools/namespaces.py -> build/lib/setuptools
copying setuptools/package_index.py -> build/lib/setuptools
copying setuptools/py34compat.py -> build/lib/setuptools
copying setuptools/sandbox.py -> build/lib/setuptools
copying setuptools/unicode_utils.py -> build/lib/setuptools
copying setuptools/version.py -> build/lib/setuptools
copying setuptools/wheel.py -> build/lib/setuptools
copying setuptools/windows_support.py -> build/lib/setuptools
creating build/lib/pkg_resources/_vendor
copying pkg_resources/_vendor/__init__.py -> build/lib/pkg_resources/_vendor
copying pkg_resources/_vendor/pyparsing.py -> build/lib/pkg_resources/_vendor
copying pkg_resources/_vendor/appdirs.py -> build/lib/pkg_resources/_vendor
creating build/lib/pkg_resources/extern
copying pkg_resources/extern/__init__.py -> build/lib/pkg_resources/extern
creating build/lib/pkg_resources/_vendor/packaging
copying pkg_resources/_vendor/packaging/__about__.py -> build/lib/pkg_resources/_vendor/packaging
copying pkg_resources/_vendor/packaging/__init__.py -> build/lib/pkg_resources/_vendor/packaging
copying pkg_resources/_vendor/packaging/_compat.py -> build/lib/pkg_resources/_vendor/packaging
copying pkg_resources/_vendor/packaging/_structures.py -> build/lib/pkg_resources/_vendor/packaging
copying pkg_resources/_vendor/packaging/_typing.py -> build/lib/pkg_resources/_vendor/packaging
copying pkg_resources/_vendor/packaging/markers.py -> build/lib/pkg_resources/_vendor/packaging
copying pkg_resources/_vendor/packaging/requirements.py -> build/lib/pkg_resources/_vendor/packaging
copying pkg_resources/_vendor/packaging/specifiers.py -> build/lib/pkg_resources/_vendor/packaging
copying pkg_resources/_vendor/packaging/tags.py -> build/lib/pkg_resources/_vendor/packaging
copying pkg_resources/_vendor/packaging/utils.py -> build/lib/pkg_resources/_vendor/packaging
copying pkg_resources/_vendor/packaging/version.py -> build/lib/pkg_resources/_vendor/packaging
package init file 'pkg_resources/tests/data/__init__.py' not found (or not a regular file)
package init file 'pkg_resources/tests/data/my-test-package-source/__init__.py' not found (or not a regular file)
creating build/lib/pkg_resources/tests
creating build/lib/pkg_resources/tests/data
creating build/lib/pkg_resources/tests/data/my-test-package-source
copying pkg_resources/tests/data/my-test-package-source/setup.py -> build/lib/pkg_resources/tests/data/my-test-package-source
package init file 'pkg_resources/tests/data/my-test-package-zip/__init__.py' not found (or not a regular file)
package init file 'pkg_resources/tests/data/my-test-package_unpacked-egg/__init__.py' not found (or not a regular file)
package init file 'pkg_resources/tests/data/my-test-package_zipped-egg/__init__.py' not found (or not a regular file)
creating build/lib/setuptools/_distutils
copying setuptools/_distutils/__init__.py -> build/lib/setuptools/_distutils
copying setuptools/_distutils/_msvccompiler.py -> build/lib/setuptools/_distutils
copying setuptools/_distutils/archive_util.py -> build/lib/setuptools/_distutils
copying setuptools/_distutils/bcppcompiler.py -> build/lib/setuptools/_distutils
copying setuptools/_distutils/ccompiler.py -> build/lib/setuptools/_distutils
copying setuptools/_distutils/cmd.py -> build/lib/setuptools/_distutils
copying setuptools/_distutils/config.py -> build/lib/setuptools/_distutils
copying setuptools/_distutils/core.py -> build/lib/setuptools/_distutils
copying setuptools/_distutils/cygwinccompiler.py -> build/lib/setuptools/_distutils
copying setuptools/_distutils/debug.py -> build/lib/setuptools/_distutils
copying setuptools/_distutils/dep_util.py -> build/lib/setuptools/_distutils
copying setuptools/_distutils/dir_util.py -> build/lib/setuptools/_distutils
copying setuptools/_distutils/dist.py -> build/lib/setuptools/_distutils
copying setuptools/_distutils/errors.py -> build/lib/setuptools/_distutils
copying setuptools/_distutils/extension.py -> build/lib/setuptools/_distutils
copying setuptools/_distutils/fancy_getopt.py -> build/lib/setuptools/_distutils
copying setuptools/_distutils/file_util.py -> build/lib/setuptools/_distutils
copying setuptools/_distutils/filelist.py -> build/lib/setuptools/_distutils
copying setuptools/_distutils/log.py -> build/lib/setuptools/_distutils
copying setuptools/_distutils/msvc9compiler.py -> build/lib/setuptools/_distutils
copying setuptools/_distutils/msvccompiler.py -> build/lib/setuptools/_distutils
copying setuptools/_distutils/py35compat.py -> build/lib/setuptools/_distutils
copying setuptools/_distutils/py38compat.py -> build/lib/setuptools/_distutils
copying setuptools/_distutils/spawn.py -> build/lib/setuptools/_distutils
copying setuptools/_distutils/sysconfig.py -> build/lib/setuptools/_distutils
copying setuptools/_distutils/text_file.py -> build/lib/setuptools/_distutils
copying setuptools/_distutils/unixccompiler.py -> build/lib/setuptools/_distutils
copying setuptools/_distutils/util.py -> build/lib/setuptools/_distutils
copying setuptools/_distutils/version.py -> build/lib/setuptools/_distutils
copying setuptools/_distutils/versionpredicate.py -> build/lib/setuptools/_distutils
creating build/lib/setuptools/_vendor
copying setuptools/_vendor/__init__.py -> build/lib/setuptools/_vendor
copying setuptools/_vendor/ordered_set.py -> build/lib/setuptools/_vendor
copying setuptools/_vendor/pyparsing.py -> build/lib/setuptools/_vendor
creating build/lib/setuptools/command
copying setuptools/command/__init__.py -> build/lib/setuptools/command
copying setuptools/command/alias.py -> build/lib/setuptools/command
copying setuptools/command/bdist_egg.py -> build/lib/setuptools/command
copying setuptools/command/bdist_rpm.py -> build/lib/setuptools/command
copying setuptools/command/build_clib.py -> build/lib/setuptools/command
copying setuptools/command/build_ext.py -> build/lib/setuptools/command
copying setuptools/command/build_py.py -> build/lib/setuptools/command
copying setuptools/command/develop.py -> build/lib/setuptools/command
copying setuptools/command/dist_info.py -> build/lib/setuptools/command
copying setuptools/command/easy_install.py -> build/lib/setuptools/command
copying setuptools/command/egg_info.py -> build/lib/setuptools/command
copying setuptools/command/install.py -> build/lib/setuptools/command
copying setuptools/command/install_egg_info.py -> build/lib/setuptools/command
copying setuptools/command/install_lib.py -> build/lib/setuptools/command
copying setuptools/command/install_scripts.py -> build/lib/setuptools/command
copying setuptools/command/py36compat.py -> build/lib/setuptools/command
copying setuptools/command/register.py -> build/lib/setuptools/command
copying setuptools/command/rotate.py -> build/lib/setuptools/command
copying setuptools/command/saveopts.py -> build/lib/setuptools/command
copying setuptools/command/sdist.py -> build/lib/setuptools/command
copying setuptools/command/setopt.py -> build/lib/setuptools/command
copying setuptools/command/test.py -> build/lib/setuptools/command
copying setuptools/command/upload.py -> build/lib/setuptools/command
copying setuptools/command/upload_docs.py -> build/lib/setuptools/command
creating build/lib/setuptools/extern
copying setuptools/extern/__init__.py -> build/lib/setuptools/extern
creating build/lib/setuptools/_distutils/command
copying setuptools/_distutils/command/__init__.py -> build/lib/setuptools/_distutils/command
copying setuptools/_distutils/command/bdist.py -> build/lib/setuptools/_distutils/command
copying setuptools/_distutils/command/bdist_dumb.py -> build/lib/setuptools/_distutils/command
copying setuptools/_distutils/command/bdist_msi.py -> build/lib/setuptools/_distutils/command
copying setuptools/_distutils/command/bdist_rpm.py -> build/lib/setuptools/_distutils/command
copying setuptools/_distutils/command/bdist_wininst.py -> build/lib/setuptools/_distutils/command
copying setuptools/_distutils/command/build.py -> build/lib/setuptools/_distutils/command
copying setuptools/_distutils/command/build_clib.py -> build/lib/setuptools/_distutils/command
copying setuptools/_distutils/command/build_ext.py -> build/lib/setuptools/_distutils/command
copying setuptools/_distutils/command/build_py.py -> build/lib/setuptools/_distutils/command
copying setuptools/_distutils/command/build_scripts.py -> build/lib/setuptools/_distutils/command
copying setuptools/_distutils/command/check.py -> build/lib/setuptools/_distutils/command
copying setuptools/_distutils/command/clean.py -> build/lib/setuptools/_distutils/command
copying setuptools/_distutils/command/config.py -> build/lib/setuptools/_distutils/command
copying setuptools/_distutils/command/install.py -> build/lib/setuptools/_distutils/command
copying setuptools/_distutils/command/install_data.py -> build/lib/setuptools/_distutils/command
copying setuptools/_distutils/command/install_egg_info.py -> build/lib/setuptools/_distutils/command
copying setuptools/_distutils/command/install_headers.py -> build/lib/setuptools/_distutils/command
copying setuptools/_distutils/command/install_lib.py -> build/lib/setuptools/_distutils/command
copying setuptools/_distutils/command/install_scripts.py -> build/lib/setuptools/_distutils/command
copying setuptools/_distutils/command/py37compat.py -> build/lib/setuptools/_distutils/command
copying setuptools/_distutils/command/register.py -> build/lib/setuptools/_distutils/command
copying setuptools/_distutils/command/sdist.py -> build/lib/setuptools/_distutils/command
copying setuptools/_distutils/command/upload.py -> build/lib/setuptools/_distutils/command
creating build/lib/setuptools/_vendor/more_itertools
copying setuptools/_vendor/more_itertools/__init__.py -> build/lib/setuptools/_vendor/more_itertools
copying setuptools/_vendor/more_itertools/more.py -> build/lib/setuptools/_vendor/more_itertools
copying setuptools/_vendor/more_itertools/recipes.py -> build/lib/setuptools/_vendor/more_itertools
creating build/lib/setuptools/_vendor/packaging
copying setuptools/_vendor/packaging/__about__.py -> build/lib/setuptools/_vendor/packaging
copying setuptools/_vendor/packaging/__init__.py -> build/lib/setuptools/_vendor/packaging
copying setuptools/_vendor/packaging/_compat.py -> build/lib/setuptools/_vendor/packaging
copying setuptools/_vendor/packaging/_structures.py -> build/lib/setuptools/_vendor/packaging
copying setuptools/_vendor/packaging/_typing.py -> build/lib/setuptools/_vendor/packaging
copying setuptools/_vendor/packaging/markers.py -> build/lib/setuptools/_vendor/packaging
copying setuptools/_vendor/packaging/requirements.py -> build/lib/setuptools/_vendor/packaging
copying setuptools/_vendor/packaging/specifiers.py -> build/lib/setuptools/_vendor/packaging
copying setuptools/_vendor/packaging/tags.py -> build/lib/setuptools/_vendor/packaging
copying setuptools/_vendor/packaging/utils.py -> build/lib/setuptools/_vendor/packaging
copying setuptools/_vendor/packaging/version.py -> build/lib/setuptools/_vendor/packaging
package init file 'setuptools/tests/indexes/__init__.py' not found (or not a regular file)
package init file 'setuptools/tests/indexes/test_links_priority/__init__.py' not found (or not a regular file)
package init file 'setuptools/tests/indexes/test_links_priority/simple/__init__.py' not found (or not a regular file)
package init file 'setuptools/tests/indexes/test_links_priority/simple/foobar/__init__.py' not found (or not a regular file)
copying setuptools/script (dev).tmpl -> build/lib/setuptools
copying setuptools/script.tmpl -> build/lib/setuptools
copying setuptools/cli-32.exe -> build/lib/setuptools
copying setuptools/cli-64.exe -> build/lib/setuptools
copying setuptools/cli.exe -> build/lib/setuptools
copying setuptools/gui-32.exe -> build/lib/setuptools
copying setuptools/gui-64.exe -> build/lib/setuptools
copying setuptools/gui.exe -> build/lib/setuptools
copying setuptools/command/launcher manifest.xml -> build/lib/setuptools/command
installing to build/bdist.linux-x86_64/wheel
running install
Distribution option extra_path is deprecated. See issue27919 for details.
running install_lib
creating build/bdist.linux-x86_64
creating build/bdist.linux-x86_64/wheel
creating build/bdist.linux-x86_64/wheel/_distutils_hack
copying build/lib/_distutils_hack/__init__.py -> build/bdist.linux-x86_64/wheel/_distutils_hack
copying build/lib/_distutils_hack/override.py -> build/bdist.linux-x86_64/wheel/_distutils_hack
creating build/bdist.linux-x86_64/wheel/pkg_resources
copying build/lib/pkg_resources/__init__.py -> build/bdist.linux-x86_64/wheel/pkg_resources
creating build/bdist.linux-x86_64/wheel/pkg_resources/_vendor
copying build/lib/pkg_resources/_vendor/__init__.py -> build/bdist.linux-x86_64/wheel/pkg_resources/_vendor
copying build/lib/pkg_resources/_vendor/pyparsing.py -> build/bdist.linux-x86_64/wheel/pkg_resources/_vendor
copying build/lib/pkg_resources/_vendor/appdirs.py -> build/bdist.linux-x86_64/wheel/pkg_resources/_vendor
creating build/bdist.linux-x86_64/wheel/pkg_resources/_vendor/packaging
copying build/lib/pkg_resources/_vendor/packaging/__about__.py -> build/bdist.linux-x86_64/wheel/pkg_resources/_vendor/packaging
copying build/lib/pkg_resources/_vendor/packaging/__init__.py -> build/bdist.linux-x86_64/wheel/pkg_resources/_vendor/packaging
copying build/lib/pkg_resources/_vendor/packaging/_compat.py -> build/bdist.linux-x86_64/wheel/pkg_resources/_vendor/packaging
copying build/lib/pkg_resources/_vendor/packaging/_structures.py -> build/bdist.linux-x86_64/wheel/pkg_resources/_vendor/packaging
copying build/lib/pkg_resources/_vendor/packaging/_typing.py -> build/bdist.linux-x86_64/wheel/pkg_resources/_vendor/packaging
copying build/lib/pkg_resources/_vendor/packaging/markers.py -> build/bdist.linux-x86_64/wheel/pkg_resources/_vendor/packaging
copying build/lib/pkg_resources/_vendor/packaging/requirements.py -> build/bdist.linux-x86_64/wheel/pkg_resources/_vendor/packaging
copying build/lib/pkg_resources/_vendor/packaging/specifiers.py -> build/bdist.linux-x86_64/wheel/pkg_resources/_vendor/packaging
copying build/lib/pkg_resources/_vendor/packaging/tags.py -> build/bdist.linux-x86_64/wheel/pkg_resources/_vendor/packaging
copying build/lib/pkg_resources/_vendor/packaging/utils.py -> build/bdist.linux-x86_64/wheel/pkg_resources/_vendor/packaging
copying build/lib/pkg_resources/_vendor/packaging/version.py -> build/bdist.linux-x86_64/wheel/pkg_resources/_vendor/packaging
creating build/bdist.linux-x86_64/wheel/pkg_resources/extern
copying build/lib/pkg_resources/extern/__init__.py -> build/bdist.linux-x86_64/wheel/pkg_resources/extern
creating build/bdist.linux-x86_64/wheel/pkg_resources/tests
creating build/bdist.linux-x86_64/wheel/pkg_resources/tests/data
creating build/bdist.linux-x86_64/wheel/pkg_resources/tests/data/my-test-package-source
copying build/lib/pkg_resources/tests/data/my-test-package-source/setup.py -> build/bdist.linux-x86_64/wheel/pkg_resources/tests/data/my-test-package-source
creating build/bdist.linux-x86_64/wheel/setuptools
copying build/lib/setuptools/__init__.py -> build/bdist.linux-x86_64/wheel/setuptools
copying build/lib/setuptools/_deprecation_warning.py -> build/bdist.linux-x86_64/wheel/setuptools
copying build/lib/setuptools/_imp.py -> build/bdist.linux-x86_64/wheel/setuptools
copying build/lib/setuptools/archive_util.py -> build/bdist.linux-x86_64/wheel/setuptools
copying build/lib/setuptools/build_meta.py -> build/bdist.linux-x86_64/wheel/setuptools
copying build/lib/setuptools/config.py -> build/bdist.linux-x86_64/wheel/setuptools
copying build/lib/setuptools/dep_util.py -> build/bdist.linux-x86_64/wheel/setuptools
copying build/lib/setuptools/depends.py -> build/bdist.linux-x86_64/wheel/setuptools
copying build/lib/setuptools/dist.py -> build/bdist.linux-x86_64/wheel/setuptools
copying build/lib/setuptools/errors.py -> build/bdist.linux-x86_64/wheel/setuptools
copying build/lib/setuptools/extension.py -> build/bdist.linux-x86_64/wheel/setuptools
copying build/lib/setuptools/glob.py -> build/bdist.linux-x86_64/wheel/setuptools
copying build/lib/setuptools/installer.py -> build/bdist.linux-x86_64/wheel/setuptools
copying build/lib/setuptools/launch.py -> build/bdist.linux-x86_64/wheel/setuptools
copying build/lib/setuptools/monkey.py -> build/bdist.linux-x86_64/wheel/setuptools
copying build/lib/setuptools/msvc.py -> build/bdist.linux-x86_64/wheel/setuptools
copying build/lib/setuptools/namespaces.py -> build/bdist.linux-x86_64/wheel/setuptools
copying build/lib/setuptools/package_index.py -> build/bdist.linux-x86_64/wheel/setuptools
copying build/lib/setuptools/py34compat.py -> build/bdist.linux-x86_64/wheel/setuptools
copying build/lib/setuptools/sandbox.py -> build/bdist.linux-x86_64/wheel/setuptools
copying build/lib/setuptools/unicode_utils.py -> build/bdist.linux-x86_64/wheel/setuptools
copying build/lib/setuptools/version.py -> build/bdist.linux-x86_64/wheel/setuptools
copying build/lib/setuptools/wheel.py -> build/bdist.linux-x86_64/wheel/setuptools
copying build/lib/setuptools/windows_support.py -> build/bdist.linux-x86_64/wheel/setuptools
creating build/bdist.linux-x86_64/wheel/setuptools/_distutils
copying build/lib/setuptools/_distutils/__init__.py -> build/bdist.linux-x86_64/wheel/setuptools/_distutils
copying build/lib/setuptools/_distutils/_msvccompiler.py -> build/bdist.linux-x86_64/wheel/setuptools/_distutils
copying build/lib/setuptools/_distutils/archive_util.py -> build/bdist.linux-x86_64/wheel/setuptools/_distutils
copying build/lib/setuptools/_distutils/bcppcompiler.py -> build/bdist.linux-x86_64/wheel/setuptools/_distutils
copying build/lib/setuptools/_distutils/ccompiler.py -> build/bdist.linux-x86_64/wheel/setuptools/_distutils
copying build/lib/setuptools/_distutils/cmd.py -> build/bdist.linux-x86_64/wheel/setuptools/_distutils
copying build/lib/setuptools/_distutils/config.py -> build/bdist.linux-x86_64/wheel/setuptools/_distutils
copying build/lib/setuptools/_distutils/core.py -> build/bdist.linux-x86_64/wheel/setuptools/_distutils
copying build/lib/setuptools/_distutils/cygwinccompiler.py -> build/bdist.linux-x86_64/wheel/setuptools/_distutils
copying build/lib/setuptools/_distutils/debug.py -> build/bdist.linux-x86_64/wheel/setuptools/_distutils
copying build/lib/setuptools/_distutils/dep_util.py -> build/bdist.linux-x86_64/wheel/setuptools/_distutils
copying build/lib/setuptools/_distutils/dir_util.py -> build/bdist.linux-x86_64/wheel/setuptools/_distutils
copying build/lib/setuptools/_distutils/dist.py -> build/bdist.linux-x86_64/wheel/setuptools/_distutils
copying build/lib/setuptools/_distutils/errors.py -> build/bdist.linux-x86_64/wheel/setuptools/_distutils
copying build/lib/setuptools/_distutils/extension.py -> build/bdist.linux-x86_64/wheel/setuptools/_distutils
copying build/lib/setuptools/_distutils/fancy_getopt.py -> build/bdist.linux-x86_64/wheel/setuptools/_distutils
copying build/lib/setuptools/_distutils/file_util.py -> build/bdist.linux-x86_64/wheel/setuptools/_distutils
copying build/lib/setuptools/_distutils/filelist.py -> build/bdist.linux-x86_64/wheel/setuptools/_distutils
copying build/lib/setuptools/_distutils/log.py -> build/bdist.linux-x86_64/wheel/setuptools/_distutils
copying build/lib/setuptools/_distutils/msvc9compiler.py -> build/bdist.linux-x86_64/wheel/setuptools/_distutils
copying build/lib/setuptools/_distutils/msvccompiler.py -> build/bdist.linux-x86_64/wheel/setuptools/_distutils
copying build/lib/setuptools/_distutils/py35compat.py -> build/bdist.linux-x86_64/wheel/setuptools/_distutils
copying build/lib/setuptools/_distutils/py38compat.py -> build/bdist.linux-x86_64/wheel/setuptools/_distutils
copying build/lib/setuptools/_distutils/spawn.py -> build/bdist.linux-x86_64/wheel/setuptools/_distutils
copying build/lib/setuptools/_distutils/sysconfig.py -> build/bdist.linux-x86_64/wheel/setuptools/_distutils
copying build/lib/setuptools/_distutils/text_file.py -> build/bdist.linux-x86_64/wheel/setuptools/_distutils
copying build/lib/setuptools/_distutils/unixccompiler.py -> build/bdist.linux-x86_64/wheel/setuptools/_distutils
copying build/lib/setuptools/_distutils/util.py -> build/bdist.linux-x86_64/wheel/setuptools/_distutils
copying build/lib/setuptools/_distutils/version.py -> build/bdist.linux-x86_64/wheel/setuptools/_distutils
copying build/lib/setuptools/_distutils/versionpredicate.py -> build/bdist.linux-x86_64/wheel/setuptools/_distutils
creating build/bdist.linux-x86_64/wheel/setuptools/_distutils/command
copying build/lib/setuptools/_distutils/command/__init__.py -> build/bdist.linux-x86_64/wheel/setuptools/_distutils/command
copying build/lib/setuptools/_distutils/command/bdist.py -> build/bdist.linux-x86_64/wheel/setuptools/_distutils/command
copying build/lib/setuptools/_distutils/command/bdist_dumb.py -> build/bdist.linux-x86_64/wheel/setuptools/_distutils/command
copying build/lib/setuptools/_distutils/command/bdist_msi.py -> build/bdist.linux-x86_64/wheel/setuptools/_distutils/command
copying build/lib/setuptools/_distutils/command/bdist_rpm.py -> build/bdist.linux-x86_64/wheel/setuptools/_distutils/command
copying build/lib/setuptools/_distutils/command/bdist_wininst.py -> build/bdist.linux-x86_64/wheel/setuptools/_distutils/command
copying build/lib/setuptools/_distutils/command/build.py -> build/bdist.linux-x86_64/wheel/setuptools/_distutils/command
copying build/lib/setuptools/_distutils/command/build_clib.py -> build/bdist.linux-x86_64/wheel/setuptools/_distutils/command
copying build/lib/setuptools/_distutils/command/build_ext.py -> build/bdist.linux-x86_64/wheel/setuptools/_distutils/command
copying build/lib/setuptools/_distutils/command/build_py.py -> build/bdist.linux-x86_64/wheel/setuptools/_distutils/command
copying build/lib/setuptools/_distutils/command/build_scripts.py -> build/bdist.linux-x86_64/wheel/setuptools/_distutils/command
copying build/lib/setuptools/_distutils/command/check.py -> build/bdist.linux-x86_64/wheel/setuptools/_distutils/command
copying build/lib/setuptools/_distutils/command/clean.py -> build/bdist.linux-x86_64/wheel/setuptools/_distutils/command
copying build/lib/setuptools/_distutils/command/config.py -> build/bdist.linux-x86_64/wheel/setuptools/_distutils/command
copying build/lib/setuptools/_distutils/command/install.py -> build/bdist.linux-x86_64/wheel/setuptools/_distutils/command
copying build/lib/setuptools/_distutils/command/install_data.py -> build/bdist.linux-x86_64/wheel/setuptools/_distutils/command
copying build/lib/setuptools/_distutils/command/install_egg_info.py -> build/bdist.linux-x86_64/wheel/setuptools/_distutils/command
copying build/lib/setuptools/_distutils/command/install_headers.py -> build/bdist.linux-x86_64/wheel/setuptools/_distutils/command
copying build/lib/setuptools/_distutils/command/install_lib.py -> build/bdist.linux-x86_64/wheel/setuptools/_distutils/command
copying build/lib/setuptools/_distutils/command/install_scripts.py -> build/bdist.linux-x86_64/wheel/setuptools/_distutils/command
copying build/lib/setuptools/_distutils/command/py37compat.py -> build/bdist.linux-x86_64/wheel/setuptools/_distutils/command
copying build/lib/setuptools/_distutils/command/register.py -> build/bdist.linux-x86_64/wheel/setuptools/_distutils/command
copying build/lib/setuptools/_distutils/command/sdist.py -> build/bdist.linux-x86_64/wheel/setuptools/_distutils/command
copying build/lib/setuptools/_distutils/command/upload.py -> build/bdist.linux-x86_64/wheel/setuptools/_distutils/command
creating build/bdist.linux-x86_64/wheel/setuptools/_vendor
copying build/lib/setuptools/_vendor/__init__.py -> build/bdist.linux-x86_64/wheel/setuptools/_vendor
copying build/lib/setuptools/_vendor/ordered_set.py -> build/bdist.linux-x86_64/wheel/setuptools/_vendor
copying build/lib/setuptools/_vendor/pyparsing.py -> build/bdist.linux-x86_64/wheel/setuptools/_vendor
creating build/bdist.linux-x86_64/wheel/setuptools/_vendor/more_itertools
copying build/lib/setuptools/_vendor/more_itertools/__init__.py -> build/bdist.linux-x86_64/wheel/setuptools/_vendor/more_itertools
copying build/lib/setuptools/_vendor/more_itertools/more.py -> build/bdist.linux-x86_64/wheel/setuptools/_vendor/more_itertools
copying build/lib/setuptools/_vendor/more_itertools/recipes.py -> build/bdist.linux-x86_64/wheel/setuptools/_vendor/more_itertools
creating build/bdist.linux-x86_64/wheel/setuptools/_vendor/packaging
copying build/lib/setuptools/_vendor/packaging/__about__.py -> build/bdist.linux-x86_64/wheel/setuptools/_vendor/packaging
copying build/lib/setuptools/_vendor/packaging/__init__.py -> build/bdist.linux-x86_64/wheel/setuptools/_vendor/packaging
copying build/lib/setuptools/_vendor/packaging/_compat.py -> build/bdist.linux-x86_64/wheel/setuptools/_vendor/packaging
copying build/lib/setuptools/_vendor/packaging/_structures.py -> build/bdist.linux-x86_64/wheel/setuptools/_vendor/packaging
copying build/lib/setuptools/_vendor/packaging/_typing.py -> build/bdist.linux-x86_64/wheel/setuptools/_vendor/packaging
copying build/lib/setuptools/_vendor/packaging/markers.py -> build/bdist.linux-x86_64/wheel/setuptools/_vendor/packaging
copying build/lib/setuptools/_vendor/packaging/requirements.py -> build/bdist.linux-x86_64/wheel/setuptools/_vendor/packaging
copying build/lib/setuptools/_vendor/packaging/specifiers.py -> build/bdist.linux-x86_64/wheel/setuptools/_vendor/packaging
copying build/lib/setuptools/_vendor/packaging/tags.py -> build/bdist.linux-x86_64/wheel/setuptools/_vendor/packaging
copying build/lib/setuptools/_vendor/packaging/utils.py -> build/bdist.linux-x86_64/wheel/setuptools/_vendor/packaging
copying build/lib/setuptools/_vendor/packaging/version.py -> build/bdist.linux-x86_64/wheel/setuptools/_vendor/packaging
creating build/bdist.linux-x86_64/wheel/setuptools/command
copying build/lib/setuptools/command/__init__.py -> build/bdist.linux-x86_64/wheel/setuptools/command
copying build/lib/setuptools/command/alias.py -> build/bdist.linux-x86_64/wheel/setuptools/command
copying build/lib/setuptools/command/bdist_egg.py -> build/bdist.linux-x86_64/wheel/setuptools/command
copying build/lib/setuptools/command/bdist_rpm.py -> build/bdist.linux-x86_64/wheel/setuptools/command
copying build/lib/setuptools/command/build_clib.py -> build/bdist.linux-x86_64/wheel/setuptools/command
copying build/lib/setuptools/command/build_ext.py -> build/bdist.linux-x86_64/wheel/setuptools/command
copying build/lib/setuptools/command/build_py.py -> build/bdist.linux-x86_64/wheel/setuptools/command
copying build/lib/setuptools/command/develop.py -> build/bdist.linux-x86_64/wheel/setuptools/command
copying build/lib/setuptools/command/dist_info.py -> build/bdist.linux-x86_64/wheel/setuptools/command
copying build/lib/setuptools/command/easy_install.py -> build/bdist.linux-x86_64/wheel/setuptools/command
copying build/lib/setuptools/command/egg_info.py -> build/bdist.linux-x86_64/wheel/setuptools/command
copying build/lib/setuptools/command/install.py -> build/bdist.linux-x86_64/wheel/setuptools/command
copying build/lib/setuptools/command/install_egg_info.py -> build/bdist.linux-x86_64/wheel/setuptools/command
copying build/lib/setuptools/command/install_lib.py -> build/bdist.linux-x86_64/wheel/setuptools/command
copying build/lib/setuptools/command/install_scripts.py -> build/bdist.linux-x86_64/wheel/setuptools/command
copying build/lib/setuptools/command/py36compat.py -> build/bdist.linux-x86_64/wheel/setuptools/command
copying build/lib/setuptools/command/register.py -> build/bdist.linux-x86_64/wheel/setuptools/command
copying build/lib/setuptools/command/rotate.py -> build/bdist.linux-x86_64/wheel/setuptools/command
copying build/lib/setuptools/command/saveopts.py -> build/bdist.linux-x86_64/wheel/setuptools/command
copying build/lib/setuptools/command/sdist.py -> build/bdist.linux-x86_64/wheel/setuptools/command
copying build/lib/setuptools/command/setopt.py -> build/bdist.linux-x86_64/wheel/setuptools/command
copying build/lib/setuptools/command/test.py -> build/bdist.linux-x86_64/wheel/setuptools/command
copying build/lib/setuptools/command/upload.py -> build/bdist.linux-x86_64/wheel/setuptools/command
copying build/lib/setuptools/command/upload_docs.py -> build/bdist.linux-x86_64/wheel/setuptools/command
copying build/lib/setuptools/command/launcher manifest.xml -> build/bdist.linux-x86_64/wheel/setuptools/command
creating build/bdist.linux-x86_64/wheel/setuptools/extern
copying build/lib/setuptools/extern/__init__.py -> build/bdist.linux-x86_64/wheel/setuptools/extern
copying build/lib/setuptools/script (dev).tmpl -> build/bdist.linux-x86_64/wheel/setuptools
copying build/lib/setuptools/script.tmpl -> build/bdist.linux-x86_64/wheel/setuptools
copying build/lib/setuptools/cli-32.exe -> build/bdist.linux-x86_64/wheel/setuptools
copying build/lib/setuptools/cli-64.exe -> build/bdist.linux-x86_64/wheel/setuptools
copying build/lib/setuptools/cli.exe -> build/bdist.linux-x86_64/wheel/setuptools
copying build/lib/setuptools/gui-32.exe -> build/bdist.linux-x86_64/wheel/setuptools
copying build/lib/setuptools/gui-64.exe -> build/bdist.linux-x86_64/wheel/setuptools
copying build/lib/setuptools/gui.exe -> build/bdist.linux-x86_64/wheel/setuptools
running install_egg_info
running egg_info
writing setuptools.egg-info/PKG-INFO
writing dependency_links to setuptools.egg-info/dependency_links.txt
writing entry points to setuptools.egg-info/entry_points.txt
writing requirements to setuptools.egg-info/requires.txt
writing top-level names to setuptools.egg-info/top_level.txt
writing setuptools.egg-info/PKG-INFO
writing dependency_links to setuptools.egg-info/dependency_links.txt
writing entry points to setuptools.egg-info/entry_points.txt
writing requirements to setuptools.egg-info/requires.txt
reading manifest file 'setuptools.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
warning: no files found matching '*.py' under directory 'tests'
warning: no files found matching '*.txt' under directory 'docs'
warning: no files found matching '*.conf' under directory 'docs'
warning: no files found matching '*.css' under directory 'docs'
warning: no files found matching '*.css_t' under directory 'docs'
warning: no files found matching 'Makefile' under directory 'docs'
warning: no files found matching 'indexsidebar.html' under directory 'docs'
adding license file 'LICENSE'
writing manifest file 'setuptools.egg-info/SOURCES.txt'
Copying setuptools.egg-info to build/bdist.linux-x86_64/wheel/setuptools-58.0.0.post20210906-py3.8.egg-info
running install_scripts
creating build/bdist.linux-x86_64/wheel/distutils-precedence.pth
adding license file "LICENSE" (matched pattern "LICEN[CS]E*")
creating build/bdist.linux-x86_64/wheel/setuptools-58.0.0.post20210906.dist-info/WHEEL
creating '/home/tkloczko/rpmbuild/BUILD/setuptools-58.0.0/dist/tmpxl3nrxzw/setuptools-58.0.0.post20210906-py3-none-any.whl' and adding 'build/bdist.linux-x86_64/wheel' to it
adding 'distutils-precedence.pth'
adding '_distutils_hack/__init__.py'
adding '_distutils_hack/override.py'
adding 'pkg_resources/__init__.py'
adding 'pkg_resources/_vendor/__init__.py'
adding 'pkg_resources/_vendor/appdirs.py'
adding 'pkg_resources/_vendor/pyparsing.py'
adding 'pkg_resources/_vendor/packaging/__about__.py'
adding 'pkg_resources/_vendor/packaging/__init__.py'
adding 'pkg_resources/_vendor/packaging/_compat.py'
adding 'pkg_resources/_vendor/packaging/_structures.py'
adding 'pkg_resources/_vendor/packaging/_typing.py'
adding 'pkg_resources/_vendor/packaging/markers.py'
adding 'pkg_resources/_vendor/packaging/requirements.py'
adding 'pkg_resources/_vendor/packaging/specifiers.py'
adding 'pkg_resources/_vendor/packaging/tags.py'
adding 'pkg_resources/_vendor/packaging/utils.py'
adding 'pkg_resources/_vendor/packaging/version.py'
adding 'pkg_resources/extern/__init__.py'
adding 'pkg_resources/tests/data/my-test-package-source/setup.py'
adding 'setuptools/__init__.py'
adding 'setuptools/_deprecation_warning.py'
adding 'setuptools/_imp.py'
adding 'setuptools/archive_util.py'
adding 'setuptools/build_meta.py'
adding 'setuptools/cli-32.exe'
adding 'setuptools/cli-64.exe'
adding 'setuptools/cli.exe'
adding 'setuptools/config.py'
adding 'setuptools/dep_util.py'
adding 'setuptools/depends.py'
adding 'setuptools/dist.py'
adding 'setuptools/errors.py'
adding 'setuptools/extension.py'
adding 'setuptools/glob.py'
adding 'setuptools/gui-32.exe'
adding 'setuptools/gui-64.exe'
adding 'setuptools/gui.exe'
adding 'setuptools/installer.py'
adding 'setuptools/launch.py'
adding 'setuptools/monkey.py'
adding 'setuptools/msvc.py'
adding 'setuptools/namespaces.py'
adding 'setuptools/package_index.py'
adding 'setuptools/py34compat.py'
adding 'setuptools/sandbox.py'
adding 'setuptools/script (dev).tmpl'
adding 'setuptools/script.tmpl'
adding 'setuptools/unicode_utils.py'
adding 'setuptools/version.py'
adding 'setuptools/wheel.py'
adding 'setuptools/windows_support.py'
adding 'setuptools/_distutils/__init__.py'
adding 'setuptools/_distutils/_msvccompiler.py'
adding 'setuptools/_distutils/archive_util.py'
adding 'setuptools/_distutils/bcppcompiler.py'
adding 'setuptools/_distutils/ccompiler.py'
adding 'setuptools/_distutils/cmd.py'
adding 'setuptools/_distutils/config.py'
adding 'setuptools/_distutils/core.py'
adding 'setuptools/_distutils/cygwinccompiler.py'
adding 'setuptools/_distutils/debug.py'
adding 'setuptools/_distutils/dep_util.py'
adding 'setuptools/_distutils/dir_util.py'
adding 'setuptools/_distutils/dist.py'
adding 'setuptools/_distutils/errors.py'
adding 'setuptools/_distutils/extension.py'
adding 'setuptools/_distutils/fancy_getopt.py'
adding 'setuptools/_distutils/file_util.py'
adding 'setuptools/_distutils/filelist.py'
adding 'setuptools/_distutils/log.py'
adding 'setuptools/_distutils/msvc9compiler.py'
adding 'setuptools/_distutils/msvccompiler.py'
adding 'setuptools/_distutils/py35compat.py'
adding 'setuptools/_distutils/py38compat.py'
adding 'setuptools/_distutils/spawn.py'
adding 'setuptools/_distutils/sysconfig.py'
adding 'setuptools/_distutils/text_file.py'
adding 'setuptools/_distutils/unixccompiler.py'
adding 'setuptools/_distutils/util.py'
adding 'setuptools/_distutils/version.py'
adding 'setuptools/_distutils/versionpredicate.py'
adding 'setuptools/_distutils/command/__init__.py'
adding 'setuptools/_distutils/command/bdist.py'
adding 'setuptools/_distutils/command/bdist_dumb.py'
adding 'setuptools/_distutils/command/bdist_msi.py'
adding 'setuptools/_distutils/command/bdist_rpm.py'
adding 'setuptools/_distutils/command/bdist_wininst.py'
adding 'setuptools/_distutils/command/build.py'
adding 'setuptools/_distutils/command/build_clib.py'
adding 'setuptools/_distutils/command/build_ext.py'
adding 'setuptools/_distutils/command/build_py.py'
adding 'setuptools/_distutils/command/build_scripts.py'
adding 'setuptools/_distutils/command/check.py'
adding 'setuptools/_distutils/command/clean.py'
adding 'setuptools/_distutils/command/config.py'
adding 'setuptools/_distutils/command/install.py'
adding 'setuptools/_distutils/command/install_data.py'
adding 'setuptools/_distutils/command/install_egg_info.py'
adding 'setuptools/_distutils/command/install_headers.py'
adding 'setuptools/_distutils/command/install_lib.py'
adding 'setuptools/_distutils/command/install_scripts.py'
adding 'setuptools/_distutils/command/py37compat.py'
adding 'setuptools/_distutils/command/register.py'
adding 'setuptools/_distutils/command/sdist.py'
adding 'setuptools/_distutils/command/upload.py'
adding 'setuptools/_vendor/__init__.py'
adding 'setuptools/_vendor/ordered_set.py'
adding 'setuptools/_vendor/pyparsing.py'
adding 'setuptools/_vendor/more_itertools/__init__.py'
adding 'setuptools/_vendor/more_itertools/more.py'
adding 'setuptools/_vendor/more_itertools/recipes.py'
adding 'setuptools/_vendor/packaging/__about__.py'
adding 'setuptools/_vendor/packaging/__init__.py'
adding 'setuptools/_vendor/packaging/_compat.py'
adding 'setuptools/_vendor/packaging/_structures.py'
adding 'setuptools/_vendor/packaging/_typing.py'
adding 'setuptools/_vendor/packaging/markers.py'
adding 'setuptools/_vendor/packaging/requirements.py'
adding 'setuptools/_vendor/packaging/specifiers.py'
adding 'setuptools/_vendor/packaging/tags.py'
adding 'setuptools/_vendor/packaging/utils.py'
adding 'setuptools/_vendor/packaging/version.py'
adding 'setuptools/command/__init__.py'
adding 'setuptools/command/alias.py'
adding 'setuptools/command/bdist_egg.py'
adding 'setuptools/command/bdist_rpm.py'
adding 'setuptools/command/build_clib.py'
adding 'setuptools/command/build_ext.py'
adding 'setuptools/command/build_py.py'
adding 'setuptools/command/develop.py'
adding 'setuptools/command/dist_info.py'
adding 'setuptools/command/easy_install.py'
adding 'setuptools/command/egg_info.py'
adding 'setuptools/command/install.py'
adding 'setuptools/command/install_egg_info.py'
adding 'setuptools/command/install_lib.py'
adding 'setuptools/command/install_scripts.py'
adding 'setuptools/command/launcher manifest.xml'
adding 'setuptools/command/py36compat.py'
adding 'setuptools/command/register.py'
adding 'setuptools/command/rotate.py'
adding 'setuptools/command/saveopts.py'
adding 'setuptools/command/sdist.py'
adding 'setuptools/command/setopt.py'
adding 'setuptools/command/test.py'
adding 'setuptools/command/upload.py'
adding 'setuptools/command/upload_docs.py'
adding 'setuptools/extern/__init__.py'
adding 'setuptools-58.0.0.post20210906.dist-info/LICENSE'
adding 'setuptools-58.0.0.post20210906.dist-info/METADATA'
adding 'setuptools-58.0.0.post20210906.dist-info/WHEEL'
adding 'setuptools-58.0.0.post20210906.dist-info/entry_points.txt'
adding 'setuptools-58.0.0.post20210906.dist-info/top_level.txt'
adding 'setuptools-58.0.0.post20210906.dist-info/RECORD'
removing build/bdist.linux-x86_64/wheel
Successfully built setuptools-58.0.0.post20210906-py3-none-any.whl

And my understanding is that how setuptools should be build because dhis module sits on top of whole dependency pyramyd and running build with isolation woild be good because it would allow avoid kind of bootstrapping process.

After build I see that still there are some spinx (4.1.2) warnings on generate man page (but IIRC I've already reported that) and pytest shows some new issues.

+ PYTHONPATH=/home/tkloczko/rpmbuild/BUILD/setuptools-58.0.0
+ /usr/bin/pytest -ra -p no:randomly --deselect pkg_resources/tests/test_pkg_resources.py::TestDeepVersionLookupDistutils::test_version_resolved_from_egg_info --ignore=pavement.py --ignore=setuptools/tests/test_integration.py
=========================================================================== test session starts ============================================================================
platform linux -- Python 3.8.12, pytest-6.2.5, py-1.10.0, pluggy-0.13.1
benchmark: 3.4.1 (defaults: timer=time.perf_counter disable_gc=False min_rounds=5 min_time=0.000005 max_time=1.0 calibration_precision=10 warmup=False warmup_iterations=100000)
rootdir: /home/tkloczko/rpmbuild/BUILD/setuptools-58.0.0, configfile: pytest.ini
plugins: forked-1.3.0, shutil-1.7.0, virtualenv-1.7.0, expect-1.1.0, flake8-1.0.7, timeout-1.4.2, betamax-0.8.1, freezegun-0.4.2, aspectlib-1.5.2, toolbox-0.5, rerunfailures-9.1.1, requests-mock-1.9.3, cov-2.12.1, flaky-3.7.0, benchmark-3.4.1, xdist-2.3.0, pylama-7.7.1, datadir-1.3.1, regressions-2.2.0, cases-3.6.3, xprocess-0.18.1, black-0.3.12, anyio-3.3.0, asyncio-0.15.1, trio-0.7.0, subtests-0.5.0, isort-2.0.0, hypothesis-6.14.6, mock-3.6.1, profiling-1.7.0, Faker-8.12.1, nose2pytest-1.0.8, pyfakefs-4.5.1, tornado-0.8.1, twisted-1.13.3
collected 721 items / 1 deselected / 2 skipped / 718 selected

pkg_resources/__init__.py ...                                                                                                                                        [  0%]
pkg_resources/api_tests.txt .                                                                                                                                        [  0%]
pkg_resources/tests/test_find_distributions.py ....                                                                                                                  [  1%]
pkg_resources/tests/test_markers.py .                                                                                                                                [  1%]
pkg_resources/tests/test_pkg_resources.py ...............ssss                                                                                                        [  3%]
pkg_resources/tests/test_resources.py ..................................................................................                                             [ 15%]
pkg_resources/tests/test_working_set.py ..................................                                                                                           [ 20%]
setuptools/dist.py .                                                                                                                                                 [ 20%]
setuptools/namespaces.py .                                                                                                                                           [ 20%]
setuptools/package_index.py ..                                                                                                                                       [ 20%]
setuptools/sandbox.py .                                                                                                                                              [ 20%]
setuptools/command/develop.py .                                                                                                                                      [ 20%]
setuptools/command/install_lib.py .                                                                                                                                  [ 20%]
setuptools/tests/test_archive_util.py X                                                                                                                              [ 21%]
setuptools/tests/test_bdist_egg.py .x                                                                                                                                [ 21%]
setuptools/tests/test_build_clib.py .                                                                                                                                [ 21%]
setuptools/tests/test_build_ext.py ....                                                                                                                              [ 22%]
setuptools/tests/test_build_meta.py ............FF................F................................................FF................F.............................. [ 39%]
......                                                                                                                                                               [ 40%]
setuptools/tests/test_build_py.py ...                                                                                                                                [ 41%]
setuptools/tests/test_config.py .............................................                                                                                        [ 47%]
setuptools/tests/test_dep_util.py .                                                                                                                                  [ 47%]
setuptools/tests/test_depends.py .                                                                                                                                   [ 47%]
setuptools/tests/test_develop.py s....F                                                                                                                              [ 48%]
setuptools/tests/test_dist.py .......x...x..........................                                                                                                 [ 53%]
setuptools/tests/test_dist_info.py ..                                                                                                                                [ 54%]
setuptools/tests/test_distutils_adoption.py ...                                                                                                                      [ 54%]
setuptools/tests/test_easy_install.py ..................................F.............                                                                               [ 61%]
setuptools/tests/test_egg_info.py .........................x...............................................                                                          [ 71%]
setuptools/tests/test_extern.py ...                                                                                                                                  [ 71%]
setuptools/tests/test_find_packages.py ............                                                                                                                  [ 73%]
setuptools/tests/test_glob.py ....                                                                                                                                   [ 73%]
setuptools/tests/test_install_scripts.py .s.s                                                                                                                        [ 74%]
setuptools/tests/test_manifest.py ...................................................................                                                                [ 83%]
setuptools/tests/test_msvc14.py ssss                                                                                                                                 [ 84%]
setuptools/tests/test_namespaces.py ....                                                                                                                             [ 84%]
setuptools/tests/test_packageindex.py ....................                                                                                                           [ 87%]
setuptools/tests/test_register.py .                                                                                                                                  [ 87%]
setuptools/tests/test_sandbox.py ..........                                                                                                                          [ 89%]
setuptools/tests/test_sdist.py ...............                                                                                                                       [ 91%]
setuptools/tests/test_setopt.py .                                                                                                                                    [ 91%]
setuptools/tests/test_setuptools.py .....................                                                                                                            [ 94%]
setuptools/tests/test_sphinx_upload_docs.py .                                                                                                                        [ 94%]
setuptools/tests/test_test.py .                                                                                                                                      [ 94%]
setuptools/tests/test_unicode_utils.py .                                                                                                                             [ 94%]
setuptools/tests/test_upload.py .                                                                                                                                    [ 94%]
setuptools/tests/test_upload_docs.py ..                                                                                                                              [ 95%]
setuptools/tests/test_virtualenv.py .....x....                                                                                                                       [ 96%]
setuptools/tests/test_wheel.py ......................                                                                                                                [ 99%]
setuptools/tests/test_windows_wrappers.py sss                                                                                                                        [100%]

================================================================================= FAILURES =================================================================================
____________________________________________________ TestBuildMetaBackend.test_build_with_existing_file_present[wheel] _____________________________________________________
concurrent.futures.process._RemoteTraceback:
"""
Traceback (most recent call last):
  File "/usr/lib64/python3.8/concurrent/futures/process.py", line 239, in _process_worker
    r = call_item.fn(*call_item.args, **call_item.kwargs)
  File "/home/tkloczko/rpmbuild/BUILD/setuptools-58.0.0/setuptools/tests/test_build_meta.py", line 57, in __call__
    return getattr(backend, name)(*args, **kw)
  File "/home/tkloczko/rpmbuild/BUILD/setuptools-58.0.0/setuptools/build_meta.py", line 221, in build_wheel
    return self._build_with_temp_dir(['bdist_wheel'], '.whl',
  File "/home/tkloczko/rpmbuild/BUILD/setuptools-58.0.0/setuptools/build_meta.py", line 207, in _build_with_temp_dir
    self.run_setup()
  File "/home/tkloczko/rpmbuild/BUILD/setuptools-58.0.0/setuptools/build_meta.py", line 150, in run_setup
    exec(compile(code, __file__, 'exec'), locals())
  File "setup.py", line 2, in <module>
    setup()
  File "/home/tkloczko/rpmbuild/BUILD/setuptools-58.0.0/setuptools/__init__.py", line 153, in setup
    return distutils.core.setup(**attrs)
  File "/usr/lib64/python3.8/distutils/core.py", line 108, in setup
    _setup_distribution = dist = klass(attrs)
  File "/home/tkloczko/rpmbuild/BUILD/setuptools-58.0.0/setuptools/dist.py", line 446, in __init__
    _Distribution.__init__(
  File "/usr/lib64/python3.8/distutils/dist.py", line 292, in __init__
    self.finalize_options()
  File "/home/tkloczko/rpmbuild/BUILD/setuptools-58.0.0/setuptools/dist.py", line 822, in finalize_options
    ep(self)
  File "/usr/lib/python3.8/site-packages/setuptools_scm/integration.py", line 90, in infer_version
    config = Configuration.from_file(dist_name=dist_name)
  File "/usr/lib/python3.8/site-packages/setuptools_scm/config.py", line 181, in from_file
    defn = _load_toml(data)
  File "/usr/lib/python3.8/site-packages/setuptools_scm/config.py", line 55, in _lazy_tomli_load
    return loads(data)
  File "/usr/lib/python3.8/site-packages/tomli/_parser.py", line 104, in loads
    pos = key_value_rule(src, pos, out, header, parse_float)
  File "/usr/lib/python3.8/site-packages/tomli/_parser.py", line 331, in key_value_rule
    pos, key, value = parse_key_value_pair(src, pos, parse_float)
  File "/usr/lib/python3.8/site-packages/tomli/_parser.py", line 366, in parse_key_value_pair
    pos, value = parse_value(src, pos, parse_float)
  File "/usr/lib/python3.8/site-packages/tomli/_parser.py", line 595, in parse_value
    return parse_one_line_basic_str(src, pos)
  File "/usr/lib/python3.8/site-packages/tomli/_parser.py", line 406, in parse_one_line_basic_str
    return parse_basic_str(src, pos, multiline=False)
  File "/usr/lib/python3.8/site-packages/tomli/_parser.py", line 579, in parse_basic_str
    raise suffixed_err(src, pos, f'Illegal character "{char!r}"')
tomli._parser.TOMLDecodeError: Illegal character "'\n'" (at line 3, column 39)
"""

The above exception was the direct cause of the following exception:

self = <setuptools.tests.test_build_meta.TestBuildMetaBackend object at 0x7f21ca4affa0>, build_type = 'wheel'
tmpdir_cwd = local('/home/tkloczko/rpmbuild/BUILD/setuptools-58.0.0')

    @pytest.mark.parametrize('build_type', ('wheel', 'sdist'))
    def test_build_with_existing_file_present(self, build_type, tmpdir_cwd):
        # Building a sdist/wheel should still succeed if there's
        # already a sdist/wheel in the destination directory.
        files = {
            'setup.py': "from setuptools import setup\nsetup()",
            'VERSION': "0.0.1",
            'setup.cfg': DALS("""
                [metadata]
                name = foo
                version = file: VERSION
            """),
            'pyproject.toml': DALS("""
                [build-system]
                requires = ["setuptools", "wheel"]
                build-backend = "setuptools.build_meta
            """),
        }

        path.build(files)

        dist_dir = os.path.abspath('preexisting-' + build_type)

        build_backend = self.get_build_backend()
        build_method = getattr(build_backend, 'build_' + build_type)

        # Build a first sdist/wheel.
        # Note: this also check the destination directory is
        # successfully created if it does not exist already.
>       first_result = build_method(dist_dir)

/home/tkloczko/rpmbuild/BUILD/setuptools-58.0.0/setuptools/tests/test_build_meta.py:184:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/home/tkloczko/rpmbuild/BUILD/setuptools-58.0.0/setuptools/tests/test_build_meta.py:34: in method
    return self.pool.submit(caller, name, *args, **kw).result()
/usr/lib64/python3.8/concurrent/futures/_base.py:444: in result
    return self.__get_result()
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = None

    def __get_result(self):
        if self._exception:
            try:
>               raise self._exception
E               tomli._parser.TOMLDecodeError: Illegal character "'\n'" (at line 3, column 39)

/usr/lib64/python3.8/concurrent/futures/_base.py:389: TOMLDecodeError
____________________________________________________ TestBuildMetaBackend.test_build_with_existing_file_present[sdist] _____________________________________________________
concurrent.futures.process._RemoteTraceback:
"""
Traceback (most recent call last):
  File "/usr/lib64/python3.8/concurrent/futures/process.py", line 239, in _process_worker
    r = call_item.fn(*call_item.args, **call_item.kwargs)
  File "/home/tkloczko/rpmbuild/BUILD/setuptools-58.0.0/setuptools/tests/test_build_meta.py", line 57, in __call__
    return getattr(backend, name)(*args, **kw)
  File "/home/tkloczko/rpmbuild/BUILD/setuptools-58.0.0/setuptools/build_meta.py", line 225, in build_sdist
    return self._build_with_temp_dir(['sdist', '--formats', 'gztar'],
  File "/home/tkloczko/rpmbuild/BUILD/setuptools-58.0.0/setuptools/build_meta.py", line 207, in _build_with_temp_dir
    self.run_setup()
  File "/home/tkloczko/rpmbuild/BUILD/setuptools-58.0.0/setuptools/build_meta.py", line 150, in run_setup
    exec(compile(code, __file__, 'exec'), locals())
  File "setup.py", line 2, in <module>
    setup()
  File "/home/tkloczko/rpmbuild/BUILD/setuptools-58.0.0/setuptools/__init__.py", line 153, in setup
    return distutils.core.setup(**attrs)
  File "/usr/lib64/python3.8/distutils/core.py", line 108, in setup
    _setup_distribution = dist = klass(attrs)
  File "/home/tkloczko/rpmbuild/BUILD/setuptools-58.0.0/setuptools/dist.py", line 446, in __init__
    _Distribution.__init__(
  File "/usr/lib64/python3.8/distutils/dist.py", line 292, in __init__
    self.finalize_options()
  File "/home/tkloczko/rpmbuild/BUILD/setuptools-58.0.0/setuptools/dist.py", line 822, in finalize_options
    ep(self)
  File "/usr/lib/python3.8/site-packages/setuptools_scm/integration.py", line 90, in infer_version
    config = Configuration.from_file(dist_name=dist_name)
  File "/usr/lib/python3.8/site-packages/setuptools_scm/config.py", line 181, in from_file
    defn = _load_toml(data)
  File "/usr/lib/python3.8/site-packages/setuptools_scm/config.py", line 55, in _lazy_tomli_load
    return loads(data)
  File "/usr/lib/python3.8/site-packages/tomli/_parser.py", line 104, in loads
    pos = key_value_rule(src, pos, out, header, parse_float)
  File "/usr/lib/python3.8/site-packages/tomli/_parser.py", line 331, in key_value_rule
    pos, key, value = parse_key_value_pair(src, pos, parse_float)
  File "/usr/lib/python3.8/site-packages/tomli/_parser.py", line 366, in parse_key_value_pair
    pos, value = parse_value(src, pos, parse_float)
  File "/usr/lib/python3.8/site-packages/tomli/_parser.py", line 595, in parse_value
    return parse_one_line_basic_str(src, pos)
  File "/usr/lib/python3.8/site-packages/tomli/_parser.py", line 406, in parse_one_line_basic_str
    return parse_basic_str(src, pos, multiline=False)
  File "/usr/lib/python3.8/site-packages/tomli/_parser.py", line 579, in parse_basic_str
    raise suffixed_err(src, pos, f'Illegal character "{char!r}"')
tomli._parser.TOMLDecodeError: Illegal character "'\n'" (at line 3, column 39)
"""

The above exception was the direct cause of the following exception:

self = <setuptools.tests.test_build_meta.TestBuildMetaBackend object at 0x7f21ca46a760>, build_type = 'sdist'
tmpdir_cwd = local('/home/tkloczko/rpmbuild/BUILD/setuptools-58.0.0')

    @pytest.mark.parametrize('build_type', ('wheel', 'sdist'))
    def test_build_with_existing_file_present(self, build_type, tmpdir_cwd):
        # Building a sdist/wheel should still succeed if there's
        # already a sdist/wheel in the destination directory.
        files = {
            'setup.py': "from setuptools import setup\nsetup()",
            'VERSION': "0.0.1",
            'setup.cfg': DALS("""
                [metadata]
                name = foo
                version = file: VERSION
            """),
            'pyproject.toml': DALS("""
                [build-system]
                requires = ["setuptools", "wheel"]
                build-backend = "setuptools.build_meta
            """),
        }

        path.build(files)

        dist_dir = os.path.abspath('preexisting-' + build_type)

        build_backend = self.get_build_backend()
        build_method = getattr(build_backend, 'build_' + build_type)

        # Build a first sdist/wheel.
        # Note: this also check the destination directory is
        # successfully created if it does not exist already.
>       first_result = build_method(dist_dir)

/home/tkloczko/rpmbuild/BUILD/setuptools-58.0.0/setuptools/tests/test_build_meta.py:184:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/home/tkloczko/rpmbuild/BUILD/setuptools-58.0.0/setuptools/tests/test_build_meta.py:34: in method
    return self.pool.submit(caller, name, *args, **kw).result()
/usr/lib64/python3.8/concurrent/futures/_base.py:444: in result
    return self.__get_result()
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = None

    def __get_result(self):
        if self._exception:
            try:
>               raise self._exception
E               tomli._parser.TOMLDecodeError: Illegal character "'\n'" (at line 3, column 39)

/usr/lib64/python3.8/concurrent/futures/_base.py:389: TOMLDecodeError
_______________________________________________________ TestBuildMetaBackend.test_build_sdist_pyproject_toml_exists ________________________________________________________
concurrent.futures.process._RemoteTraceback:
"""
Traceback (most recent call last):
  File "/usr/lib64/python3.8/concurrent/futures/process.py", line 239, in _process_worker
    r = call_item.fn(*call_item.args, **call_item.kwargs)
  File "/home/tkloczko/rpmbuild/BUILD/setuptools-58.0.0/setuptools/tests/test_build_meta.py", line 57, in __call__
    return getattr(backend, name)(*args, **kw)
  File "/home/tkloczko/rpmbuild/BUILD/setuptools-58.0.0/setuptools/build_meta.py", line 225, in build_sdist
    return self._build_with_temp_dir(['sdist', '--formats', 'gztar'],
  File "/home/tkloczko/rpmbuild/BUILD/setuptools-58.0.0/setuptools/build_meta.py", line 207, in _build_with_temp_dir
    self.run_setup()
  File "/home/tkloczko/rpmbuild/BUILD/setuptools-58.0.0/setuptools/build_meta.py", line 150, in run_setup
    exec(compile(code, __file__, 'exec'), locals())
  File "setup.py", line 1, in <module>
    __import__('setuptools').setup(
  File "/home/tkloczko/rpmbuild/BUILD/setuptools-58.0.0/setuptools/__init__.py", line 153, in setup
    return distutils.core.setup(**attrs)
  File "/usr/lib64/python3.8/distutils/core.py", line 108, in setup
    _setup_distribution = dist = klass(attrs)
  File "/home/tkloczko/rpmbuild/BUILD/setuptools-58.0.0/setuptools/dist.py", line 446, in __init__
    _Distribution.__init__(
  File "/usr/lib64/python3.8/distutils/dist.py", line 292, in __init__
    self.finalize_options()
  File "/home/tkloczko/rpmbuild/BUILD/setuptools-58.0.0/setuptools/dist.py", line 822, in finalize_options
    ep(self)
  File "/usr/lib/python3.8/site-packages/setuptools_scm/integration.py", line 90, in infer_version
    config = Configuration.from_file(dist_name=dist_name)
  File "/usr/lib/python3.8/site-packages/setuptools_scm/config.py", line 181, in from_file
    defn = _load_toml(data)
  File "/usr/lib/python3.8/site-packages/setuptools_scm/config.py", line 55, in _lazy_tomli_load
    return loads(data)
  File "/usr/lib/python3.8/site-packages/tomli/_parser.py", line 104, in loads
    pos = key_value_rule(src, pos, out, header, parse_float)
  File "/usr/lib/python3.8/site-packages/tomli/_parser.py", line 331, in key_value_rule
    pos, key, value = parse_key_value_pair(src, pos, parse_float)
  File "/usr/lib/python3.8/site-packages/tomli/_parser.py", line 366, in parse_key_value_pair
    pos, value = parse_value(src, pos, parse_float)
  File "/usr/lib/python3.8/site-packages/tomli/_parser.py", line 595, in parse_value
    return parse_one_line_basic_str(src, pos)
  File "/usr/lib/python3.8/site-packages/tomli/_parser.py", line 406, in parse_one_line_basic_str
    return parse_basic_str(src, pos, multiline=False)
  File "/usr/lib/python3.8/site-packages/tomli/_parser.py", line 579, in parse_basic_str
    raise suffixed_err(src, pos, f'Illegal character "{char!r}"')
tomli._parser.TOMLDecodeError: Illegal character "'\n'" (at line 3, column 39)
"""

The above exception was the direct cause of the following exception:

self = <setuptools.tests.test_build_meta.TestBuildMetaBackend object at 0x7f21ca42ab20>, tmpdir_cwd = local('/home/tkloczko/rpmbuild/BUILD/setuptools-58.0.0')

    def test_build_sdist_pyproject_toml_exists(self, tmpdir_cwd):
        files = {
            'setup.py': DALS("""
                __import__('setuptools').setup(
                    name='foo',
                    version='0.0.0',
                    py_modules=['hello']
                )"""),
            'hello.py': '',
            'pyproject.toml': DALS("""
                [build-system]
                requires = ["setuptools", "wheel"]
                build-backend = "setuptools.build_meta
                """),
        }
        path.build(files)
        build_backend = self.get_build_backend()
>       targz_path = build_backend.build_sdist("temp")

/home/tkloczko/rpmbuild/BUILD/setuptools-58.0.0/setuptools/tests/test_build_meta.py:268:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/home/tkloczko/rpmbuild/BUILD/setuptools-58.0.0/setuptools/tests/test_build_meta.py:34: in method
    return self.pool.submit(caller, name, *args, **kw).result()
/usr/lib64/python3.8/concurrent/futures/_base.py:444: in result
    return self.__get_result()
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = None

    def __get_result(self):
        if self._exception:
            try:
>               raise self._exception
E               tomli._parser.TOMLDecodeError: Illegal character "'\n'" (at line 3, column 39)

/usr/lib64/python3.8/concurrent/futures/_base.py:389: TOMLDecodeError
_________________________________________________ TestBuildMetaLegacyBackend.test_build_with_existing_file_present[wheel] __________________________________________________
concurrent.futures.process._RemoteTraceback:
"""
Traceback (most recent call last):
  File "/usr/lib64/python3.8/concurrent/futures/process.py", line 239, in _process_worker
    r = call_item.fn(*call_item.args, **call_item.kwargs)
  File "/home/tkloczko/rpmbuild/BUILD/setuptools-58.0.0/setuptools/tests/test_build_meta.py", line 57, in __call__
    return getattr(backend, name)(*args, **kw)
  File "/home/tkloczko/rpmbuild/BUILD/setuptools-58.0.0/setuptools/build_meta.py", line 221, in build_wheel
    return self._build_with_temp_dir(['bdist_wheel'], '.whl',
  File "/home/tkloczko/rpmbuild/BUILD/setuptools-58.0.0/setuptools/build_meta.py", line 207, in _build_with_temp_dir
    self.run_setup()
  File "/home/tkloczko/rpmbuild/BUILD/setuptools-58.0.0/setuptools/build_meta.py", line 258, in run_setup
    super(_BuildMetaLegacyBackend,
  File "/home/tkloczko/rpmbuild/BUILD/setuptools-58.0.0/setuptools/build_meta.py", line 150, in run_setup
    exec(compile(code, __file__, 'exec'), locals())
  File "setup.py", line 2, in <module>
    setup()
  File "/home/tkloczko/rpmbuild/BUILD/setuptools-58.0.0/setuptools/__init__.py", line 153, in setup
    return distutils.core.setup(**attrs)
  File "/usr/lib64/python3.8/distutils/core.py", line 108, in setup
    _setup_distribution = dist = klass(attrs)
  File "/home/tkloczko/rpmbuild/BUILD/setuptools-58.0.0/setuptools/dist.py", line 446, in __init__
    _Distribution.__init__(
  File "/usr/lib64/python3.8/distutils/dist.py", line 292, in __init__
    self.finalize_options()
  File "/home/tkloczko/rpmbuild/BUILD/setuptools-58.0.0/setuptools/dist.py", line 822, in finalize_options
    ep(self)
  File "/usr/lib/python3.8/site-packages/setuptools_scm/integration.py", line 90, in infer_version
    config = Configuration.from_file(dist_name=dist_name)
  File "/usr/lib/python3.8/site-packages/setuptools_scm/config.py", line 181, in from_file
    defn = _load_toml(data)
  File "/usr/lib/python3.8/site-packages/setuptools_scm/config.py", line 55, in _lazy_tomli_load
    return loads(data)
  File "/usr/lib/python3.8/site-packages/tomli/_parser.py", line 104, in loads
    pos = key_value_rule(src, pos, out, header, parse_float)
  File "/usr/lib/python3.8/site-packages/tomli/_parser.py", line 331, in key_value_rule
    pos, key, value = parse_key_value_pair(src, pos, parse_float)
  File "/usr/lib/python3.8/site-packages/tomli/_parser.py", line 366, in parse_key_value_pair
    pos, value = parse_value(src, pos, parse_float)
  File "/usr/lib/python3.8/site-packages/tomli/_parser.py", line 595, in parse_value
    return parse_one_line_basic_str(src, pos)
  File "/usr/lib/python3.8/site-packages/tomli/_parser.py", line 406, in parse_one_line_basic_str
    return parse_basic_str(src, pos, multiline=False)
  File "/usr/lib/python3.8/site-packages/tomli/_parser.py", line 579, in parse_basic_str
    raise suffixed_err(src, pos, f'Illegal character "{char!r}"')
tomli._parser.TOMLDecodeError: Illegal character "'\n'" (at line 3, column 39)
"""

The above exception was the direct cause of the following exception:

self = <setuptools.tests.test_build_meta.TestBuildMetaLegacyBackend object at 0x7f21ca439370>, build_type = 'wheel'
tmpdir_cwd = local('/home/tkloczko/rpmbuild/BUILD/setuptools-58.0.0')

    @pytest.mark.parametrize('build_type', ('wheel', 'sdist'))
    def test_build_with_existing_file_present(self, build_type, tmpdir_cwd):
        # Building a sdist/wheel should still succeed if there's
        # already a sdist/wheel in the destination directory.
        files = {
            'setup.py': "from setuptools import setup\nsetup()",
            'VERSION': "0.0.1",
            'setup.cfg': DALS("""
                [metadata]
                name = foo
                version = file: VERSION
            """),
            'pyproject.toml': DALS("""
                [build-system]
                requires = ["setuptools", "wheel"]
                build-backend = "setuptools.build_meta
            """),
        }

        path.build(files)

        dist_dir = os.path.abspath('preexisting-' + build_type)

        build_backend = self.get_build_backend()
        build_method = getattr(build_backend, 'build_' + build_type)

        # Build a first sdist/wheel.
        # Note: this also check the destination directory is
        # successfully created if it does not exist already.
>       first_result = build_method(dist_dir)

/home/tkloczko/rpmbuild/BUILD/setuptools-58.0.0/setuptools/tests/test_build_meta.py:184:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/home/tkloczko/rpmbuild/BUILD/setuptools-58.0.0/setuptools/tests/test_build_meta.py:34: in method
    return self.pool.submit(caller, name, *args, **kw).result()
/usr/lib64/python3.8/concurrent/futures/_base.py:444: in result
    return self.__get_result()
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = None

    def __get_result(self):
        if self._exception:
            try:
>               raise self._exception
E               tomli._parser.TOMLDecodeError: Illegal character "'\n'" (at line 3, column 39)

/usr/lib64/python3.8/concurrent/futures/_base.py:389: TOMLDecodeError
_________________________________________________ TestBuildMetaLegacyBackend.test_build_with_existing_file_present[sdist] __________________________________________________
concurrent.futures.process._RemoteTraceback:
"""
Traceback (most recent call last):
  File "/usr/lib64/python3.8/concurrent/futures/process.py", line 239, in _process_worker
    r = call_item.fn(*call_item.args, **call_item.kwargs)
  File "/home/tkloczko/rpmbuild/BUILD/setuptools-58.0.0/setuptools/tests/test_build_meta.py", line 57, in __call__
    return getattr(backend, name)(*args, **kw)
  File "/home/tkloczko/rpmbuild/BUILD/setuptools-58.0.0/setuptools/build_meta.py", line 225, in build_sdist
    return self._build_with_temp_dir(['sdist', '--formats', 'gztar'],
  File "/home/tkloczko/rpmbuild/BUILD/setuptools-58.0.0/setuptools/build_meta.py", line 207, in _build_with_temp_dir
    self.run_setup()
  File "/home/tkloczko/rpmbuild/BUILD/setuptools-58.0.0/setuptools/build_meta.py", line 258, in run_setup
    super(_BuildMetaLegacyBackend,
  File "/home/tkloczko/rpmbuild/BUILD/setuptools-58.0.0/setuptools/build_meta.py", line 150, in run_setup
    exec(compile(code, __file__, 'exec'), locals())
  File "setup.py", line 2, in <module>
    setup()
  File "/home/tkloczko/rpmbuild/BUILD/setuptools-58.0.0/setuptools/__init__.py", line 153, in setup
    return distutils.core.setup(**attrs)
  File "/usr/lib64/python3.8/distutils/core.py", line 108, in setup
    _setup_distribution = dist = klass(attrs)
  File "/home/tkloczko/rpmbuild/BUILD/setuptools-58.0.0/setuptools/dist.py", line 446, in __init__
    _Distribution.__init__(
  File "/usr/lib64/python3.8/distutils/dist.py", line 292, in __init__
    self.finalize_options()
  File "/home/tkloczko/rpmbuild/BUILD/setuptools-58.0.0/setuptools/dist.py", line 822, in finalize_options
    ep(self)
  File "/usr/lib/python3.8/site-packages/setuptools_scm/integration.py", line 90, in infer_version
    config = Configuration.from_file(dist_name=dist_name)
  File "/usr/lib/python3.8/site-packages/setuptools_scm/config.py", line 181, in from_file
    defn = _load_toml(data)
  File "/usr/lib/python3.8/site-packages/setuptools_scm/config.py", line 55, in _lazy_tomli_load
    return loads(data)
  File "/usr/lib/python3.8/site-packages/tomli/_parser.py", line 104, in loads
    pos = key_value_rule(src, pos, out, header, parse_float)
  File "/usr/lib/python3.8/site-packages/tomli/_parser.py", line 331, in key_value_rule
    pos, key, value = parse_key_value_pair(src, pos, parse_float)
  File "/usr/lib/python3.8/site-packages/tomli/_parser.py", line 366, in parse_key_value_pair
    pos, value = parse_value(src, pos, parse_float)
  File "/usr/lib/python3.8/site-packages/tomli/_parser.py", line 595, in parse_value
    return parse_one_line_basic_str(src, pos)
  File "/usr/lib/python3.8/site-packages/tomli/_parser.py", line 406, in parse_one_line_basic_str
    return parse_basic_str(src, pos, multiline=False)
  File "/usr/lib/python3.8/site-packages/tomli/_parser.py", line 579, in parse_basic_str
    raise suffixed_err(src, pos, f'Illegal character "{char!r}"')
tomli._parser.TOMLDecodeError: Illegal character "'\n'" (at line 3, column 39)
"""

The above exception was the direct cause of the following exception:

self = <setuptools.tests.test_build_meta.TestBuildMetaLegacyBackend object at 0x7f21ca35f040>, build_type = 'sdist'
tmpdir_cwd = local('/home/tkloczko/rpmbuild/BUILD/setuptools-58.0.0')

    @pytest.mark.parametrize('build_type', ('wheel', 'sdist'))
    def test_build_with_existing_file_present(self, build_type, tmpdir_cwd):
        # Building a sdist/wheel should still succeed if there's
        # already a sdist/wheel in the destination directory.
        files = {
            'setup.py': "from setuptools import setup\nsetup()",
            'VERSION': "0.0.1",
            'setup.cfg': DALS("""
                [metadata]
                name = foo
                version = file: VERSION
            """),
            'pyproject.toml': DALS("""
                [build-system]
                requires = ["setuptools", "wheel"]
                build-backend = "setuptools.build_meta
            """),
        }

        path.build(files)

        dist_dir = os.path.abspath('preexisting-' + build_type)

        build_backend = self.get_build_backend()
        build_method = getattr(build_backend, 'build_' + build_type)

        # Build a first sdist/wheel.
        # Note: this also check the destination directory is
        # successfully created if it does not exist already.
>       first_result = build_method(dist_dir)

/home/tkloczko/rpmbuild/BUILD/setuptools-58.0.0/setuptools/tests/test_build_meta.py:184:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/home/tkloczko/rpmbuild/BUILD/setuptools-58.0.0/setuptools/tests/test_build_meta.py:34: in method
    return self.pool.submit(caller, name, *args, **kw).result()
/usr/lib64/python3.8/concurrent/futures/_base.py:444: in result
    return self.__get_result()
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = None

    def __get_result(self):
        if self._exception:
            try:
>               raise self._exception
E               tomli._parser.TOMLDecodeError: Illegal character "'\n'" (at line 3, column 39)

/usr/lib64/python3.8/concurrent/futures/_base.py:389: TOMLDecodeError
____________________________________________________ TestBuildMetaLegacyBackend.test_build_sdist_pyproject_toml_exists _____________________________________________________
concurrent.futures.process._RemoteTraceback:
"""
Traceback (most recent call last):
  File "/usr/lib64/python3.8/concurrent/futures/process.py", line 239, in _process_worker
    r = call_item.fn(*call_item.args, **call_item.kwargs)
  File "/home/tkloczko/rpmbuild/BUILD/setuptools-58.0.0/setuptools/tests/test_build_meta.py", line 57, in __call__
    return getattr(backend, name)(*args, **kw)
  File "/home/tkloczko/rpmbuild/BUILD/setuptools-58.0.0/setuptools/build_meta.py", line 225, in build_sdist
    return self._build_with_temp_dir(['sdist', '--formats', 'gztar'],
  File "/home/tkloczko/rpmbuild/BUILD/setuptools-58.0.0/setuptools/build_meta.py", line 207, in _build_with_temp_dir
    self.run_setup()
  File "/home/tkloczko/rpmbuild/BUILD/setuptools-58.0.0/setuptools/build_meta.py", line 258, in run_setup
    super(_BuildMetaLegacyBackend,
  File "/home/tkloczko/rpmbuild/BUILD/setuptools-58.0.0/setuptools/build_meta.py", line 150, in run_setup
    exec(compile(code, __file__, 'exec'), locals())
  File "setup.py", line 1, in <module>
    __import__('setuptools').setup(
  File "/home/tkloczko/rpmbuild/BUILD/setuptools-58.0.0/setuptools/__init__.py", line 153, in setup
    return distutils.core.setup(**attrs)
  File "/usr/lib64/python3.8/distutils/core.py", line 108, in setup
    _setup_distribution = dist = klass(attrs)
  File "/home/tkloczko/rpmbuild/BUILD/setuptools-58.0.0/setuptools/dist.py", line 446, in __init__
    _Distribution.__init__(
  File "/usr/lib64/python3.8/distutils/dist.py", line 292, in __init__
    self.finalize_options()
  File "/home/tkloczko/rpmbuild/BUILD/setuptools-58.0.0/setuptools/dist.py", line 822, in finalize_options
    ep(self)
  File "/usr/lib/python3.8/site-packages/setuptools_scm/integration.py", line 90, in infer_version
    config = Configuration.from_file(dist_name=dist_name)
  File "/usr/lib/python3.8/site-packages/setuptools_scm/config.py", line 181, in from_file
    defn = _load_toml(data)
  File "/usr/lib/python3.8/site-packages/setuptools_scm/config.py", line 55, in _lazy_tomli_load
    return loads(data)
  File "/usr/lib/python3.8/site-packages/tomli/_parser.py", line 104, in loads
    pos = key_value_rule(src, pos, out, header, parse_float)
  File "/usr/lib/python3.8/site-packages/tomli/_parser.py", line 331, in key_value_rule
    pos, key, value = parse_key_value_pair(src, pos, parse_float)
  File "/usr/lib/python3.8/site-packages/tomli/_parser.py", line 366, in parse_key_value_pair
    pos, value = parse_value(src, pos, parse_float)
  File "/usr/lib/python3.8/site-packages/tomli/_parser.py", line 595, in parse_value
    return parse_one_line_basic_str(src, pos)
  File "/usr/lib/python3.8/site-packages/tomli/_parser.py", line 406, in parse_one_line_basic_str
    return parse_basic_str(src, pos, multiline=False)
  File "/usr/lib/python3.8/site-packages/tomli/_parser.py", line 579, in parse_basic_str
    raise suffixed_err(src, pos, f'Illegal character "{char!r}"')
tomli._parser.TOMLDecodeError: Illegal character "'\n'" (at line 3, column 39)
"""

The above exception was the direct cause of the following exception:

self = <setuptools.tests.test_build_meta.TestBuildMetaLegacyBackend object at 0x7f21ca48e2e0>, tmpdir_cwd = local('/home/tkloczko/rpmbuild/BUILD/setuptools-58.0.0')

    def test_build_sdist_pyproject_toml_exists(self, tmpdir_cwd):
        files = {
            'setup.py': DALS("""
                __import__('setuptools').setup(
                    name='foo',
                    version='0.0.0',
                    py_modules=['hello']
                )"""),
            'hello.py': '',
            'pyproject.toml': DALS("""
                [build-system]
                requires = ["setuptools", "wheel"]
                build-backend = "setuptools.build_meta
                """),
        }
        path.build(files)
        build_backend = self.get_build_backend()
>       targz_path = build_backend.build_sdist("temp")

/home/tkloczko/rpmbuild/BUILD/setuptools-58.0.0/setuptools/tests/test_build_meta.py:268:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/home/tkloczko/rpmbuild/BUILD/setuptools-58.0.0/setuptools/tests/test_build_meta.py:34: in method
    return self.pool.submit(caller, name, *args, **kw).result()
/usr/lib64/python3.8/concurrent/futures/_base.py:444: in result
    return self.__get_result()
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = None

    def __get_result(self):
        if self._exception:
            try:
>               raise self._exception
E               tomli._parser.TOMLDecodeError: Illegal character "'\n'" (at line 3, column 39)

/usr/lib64/python3.8/concurrent/futures/_base.py:389: TOMLDecodeError
___________________________________________________________________ TestNamespaces.test_editable_prefix ____________________________________________________________________

self = <setuptools.tests.test_develop.TestNamespaces object at 0x7f21af9f1b80>, tmp_path = PosixPath('/tmp/pytest-of-tkloczko/pytest-59/test_editable_prefix0')
sample_project = PosixPath('/tmp/pytest-of-tkloczko/pytest-59/test_editable_prefix0/sampleproject')

    @pytest.mark.xfail(
        platform.python_implementation() == 'PyPy',
        reason="Workaround fails on PyPy (why?)",
    )
    def test_editable_prefix(self, tmp_path, sample_project):
        """
        Editable install to a prefix should be discoverable.
        """
        prefix = tmp_path / 'prefix'
        prefix.mkdir()

        # figure out where pip will likely install the package
        site_packages = prefix / next(
            pathlib.Path(path).relative_to(sys.prefix)
            for path in sys.path
            if 'site-packages' in path and path.startswith(sys.prefix)
        )

        # install the workaround
        self.install_workaround(site_packages)

        env = dict(os.environ, PYTHONPATH=str(site_packages))
        cmd = [
            sys.executable,
            '-m',
            'pip',
            'install',
            '--editable',
            str(sample_project),
            '--prefix',
            str(prefix),
            '--no-build-isolation',
        ]
        subprocess.check_call(cmd, env=env)

        # now run 'sample' with the prefix on the PYTHONPATH
        bin = 'Scripts' if platform.system() == 'Windows' else 'bin'
        exe = prefix / bin / 'sample'
        if sys.version_info < (3, 7) and platform.system() == 'Windows':
            exe = str(exe)
>       subprocess.check_call([exe], env=env)

setuptools/tests/test_develop.py:224:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

popenargs = ([PosixPath('/tmp/pytest-of-tkloczko/pytest-59/test_editable_prefix0/prefix/bin/sample')],)
kwargs = {'env': {'AR': '/usr/bin/gcc-ar', 'BASH_FUNC_which%%': '() {  ( alias;\n eval ${which_declare} ) | /usr/bin/which --tt...es -fstack-clash-protection -fcf-protection -fdata-sections -ffunction-sections -flto=auto -flto-partition=none', ...}}
retcode = 1, cmd = [PosixPath('/tmp/pytest-of-tkloczko/pytest-59/test_editable_prefix0/prefix/bin/sample')]

    def check_call(*popenargs, **kwargs):
        """Run command with arguments.  Wait for command to complete.  If
        the exit code was zero then return, otherwise raise
        CalledProcessError.  The CalledProcessError object will have the
        return code in the returncode attribute.

        The arguments are the same as for the call function.  Example:

        check_call(["ls", "-l"])
        """
        retcode = call(*popenargs, **kwargs)
        if retcode:
            cmd = kwargs.get("args")
            if cmd is None:
                cmd = popenargs[0]
>           raise CalledProcessError(retcode, cmd)
E           subprocess.CalledProcessError: Command '[PosixPath('/tmp/pytest-of-tkloczko/pytest-59/test_editable_prefix0/prefix/bin/sample')]' returned non-zero exit status 1.

/usr/lib64/python3.8/subprocess.py:364: CalledProcessError
-------------------------------------------------------------------------- Captured stderr setup ---------------------------------------------------------------------------
Cloning into 'sampleproject'...
--------------------------------------------------------------------------- Captured stdout call ---------------------------------------------------------------------------
Obtaining file:///tmp/pytest-of-tkloczko/pytest-59/test_editable_prefix0/sampleproject
    Preparing wheel metadata: started
    Preparing wheel metadata: finished with status 'done'
Collecting peppercorn
  Using cached peppercorn-0.6-py3-none-any.whl (4.8 kB)
Installing collected packages: peppercorn, sampleproject
  Running setup.py develop for sampleproject
Successfully installed peppercorn-0.6 sampleproject-2.0.0
--------------------------------------------------------------------------- Captured stderr call ---------------------------------------------------------------------------
Traceback (most recent call last):
  File "/tmp/pytest-of-tkloczko/pytest-59/test_editable_prefix0/prefix/bin/sample", line 33, in <module>
    sys.exit(load_entry_point('sampleproject', 'console_scripts', 'sample')())
  File "/tmp/pytest-of-tkloczko/pytest-59/test_editable_prefix0/prefix/bin/sample", line 22, in importlib_load_entry_point
    for entry_point in distribution(dist_name).entry_points
  File "/usr/lib64/python3.8/importlib/metadata.py", line 503, in distribution
    return Distribution.from_name(distribution_name)
  File "/usr/lib64/python3.8/importlib/metadata.py", line 177, in from_name
    raise PackageNotFoundError(name)
importlib.metadata.PackageNotFoundError: sampleproject
__________________________________________________________ TestSetupRequires.test_setup_requires_with_allow_hosts __________________________________________________________

self = <setuptools.tests.test_easy_install.TestSetupRequires object at 0x7f2130e96580>, mock_index = <MockServer(Thread-4, started daemon 139780391347776)>

    def test_setup_requires_with_allow_hosts(self, mock_index):
        ''' The `allow-hosts` option in not supported anymore. '''
        with contexts.save_pkg_resources_state():
            with contexts.tempdir() as temp_dir:
                test_pkg = os.path.join(temp_dir, 'test_pkg')
                test_setup_py = os.path.join(test_pkg, 'setup.py')
                test_setup_cfg = os.path.join(test_pkg, 'setup.cfg')
                os.mkdir(test_pkg)
                with open(test_setup_py, 'w') as fp:
                    fp.write(DALS(
                        '''
                        from setuptools import setup
                        setup(setup_requires='python-xlib')
                        '''))
                with open(test_setup_cfg, 'w') as fp:
                    fp.write(DALS(
                        '''
                        [easy_install]
                        allow_hosts = *
                        '''))
                with pytest.raises(distutils.errors.DistutilsError):
>                   run_setup(test_setup_py, [str('--version')])
E                   Failed: DID NOT RAISE <class 'distutils.errors.DistutilsError'>

setuptools/tests/test_easy_install.py:691: Failed
--------------------------------------------------------------------------- Captured stdout call ---------------------------------------------------------------------------
0.0.0
========================================================================= short test summary info ==========================================================================
SKIPPED [2] setuptools/tests/test_msvc.py:17: could not import 'distutils.msvc9compiler': No module named 'winreg'
SKIPPED [1] pkg_resources/tests/test_pkg_resources.py:382: Testing case-insensitive filesystems.
SKIPPED [3] pkg_resources/tests/test_pkg_resources.py:399: Testing systems using backslashes as path separators.
SKIPPED [1] setuptools/tests/test_develop.py:66: TODO: needs a fixture to cause 'develop' to be invoked without mutating environment.
SKIPPED [1] setuptools/tests/test_install_scripts.py:50: Windows only
SKIPPED [1] setuptools/tests/test_install_scripts.py:78: Windows only
SKIPPED [1] setuptools/tests/test_msvc14.py:16: These tests are only for win32
SKIPPED [1] setuptools/tests/test_msvc14.py:34: These tests are only for win32
SKIPPED [1] setuptools/tests/test_msvc14.py:52: These tests are only for win32
SKIPPED [1] setuptools/tests/test_msvc14.py:68: These tests are only for win32
SKIPPED [1] setuptools/tests/test_windows_wrappers.py:69: Windows only
SKIPPED [1] setuptools/tests/test_windows_wrappers.py:110: Windows only
SKIPPED [1] setuptools/tests/test_windows_wrappers.py:169: Windows only
XFAIL setuptools/tests/test_bdist_egg.py::Test::test_exclude_source_files
  Byte code disabled
XFAIL setuptools/tests/test_dist.py::test_read_metadata[Metadata Version 1.2: Project-Url-attrs5]
  Issue #1578: project_urls not read
XFAIL setuptools/tests/test_dist.py::test_read_metadata[Metadata Version 2.1: Provides Extra-attrs9]
  provides_extras not read
XFAIL setuptools/tests/test_egg_info.py::TestEggInfo::test_requires[extras_require_with_marker_in_setup_cfg]
XFAIL setuptools/tests/test_virtualenv.py::test_pip_upgrade_from_source[pip==19.3.1]
  pypa/pip#6599
XPASS setuptools/tests/test_archive_util.py::test_unicode_files #710 and #712
FAILED setuptools/tests/test_build_meta.py::TestBuildMetaBackend::test_build_with_existing_file_present[wheel] - tomli._parser.TOMLDecodeError: Illegal character "'\n'" ...
FAILED setuptools/tests/test_build_meta.py::TestBuildMetaBackend::test_build_with_existing_file_present[sdist] - tomli._parser.TOMLDecodeError: Illegal character "'\n'" ...
FAILED setuptools/tests/test_build_meta.py::TestBuildMetaBackend::test_build_sdist_pyproject_toml_exists - tomli._parser.TOMLDecodeError: Illegal character "'\n'" (at li...
FAILED setuptools/tests/test_build_meta.py::TestBuildMetaLegacyBackend::test_build_with_existing_file_present[wheel] - tomli._parser.TOMLDecodeError: Illegal character "...
FAILED setuptools/tests/test_build_meta.py::TestBuildMetaLegacyBackend::test_build_with_existing_file_present[sdist] - tomli._parser.TOMLDecodeError: Illegal character "...
FAILED setuptools/tests/test_build_meta.py::TestBuildMetaLegacyBackend::test_build_sdist_pyproject_toml_exists - tomli._parser.TOMLDecodeError: Illegal character "'\n'" ...
FAILED setuptools/tests/test_develop.py::TestNamespaces::test_editable_prefix - subprocess.CalledProcessError: Command '[PosixPath('/tmp/pytest-of-tkloczko/pytest-59/tes...
FAILED setuptools/tests/test_easy_install.py::TestSetupRequires::test_setup_requires_with_allow_hosts - Failed: DID NOT RAISE <class 'distutils.errors.DistutilsError'>
======================================== 8 failed, 692 passed, 16 skipped, 1 deselected, 5 xfailed, 1 xpassed in 438.35s (0:07:18) =========================================
pytest-xprocess reminder::Be sure to terminate the started process by running 'pytest --xkill' if you have not explicitly done so in your fixture with 'xprocess.getinfo(<process_name>).terminate()'.
/usr/lib/python3.8/site-packages/_pytest/pathlib.py:80: PytestWarning: (rm_rf) error removing /tmp/pytest-of-tkloczko/garbage-f1f3071b-83c8-46de-8bca-692999f05c54/test_rmtree_errorhandler_reado0
<class 'OSError'>: [Errno 39] Directory not empty: 'test_rmtree_errorhandler_reado0'
  warnings.warn(
/usr/lib/python3.8/site-packages/_pytest/pathlib.py:80: PytestWarning: (rm_rf) error removing /tmp/pytest-of-tkloczko/garbage-f1f3071b-83c8-46de-8bca-692999f05c54/test_rmtree_errorhandler_rerai0
<class 'OSError'>: [Errno 39] Directory not empty: 'test_rmtree_errorhandler_rerai0'
  warnings.warn(
/usr/lib/python3.8/site-packages/_pytest/pathlib.py:80: PytestWarning: (rm_rf) error removing /tmp/pytest-of-tkloczko/garbage-f1f3071b-83c8-46de-8bca-692999f05c54/test_safe_set_no_perms0
<class 'OSError'>: [Errno 39] Directory not empty: 'test_safe_set_no_perms0'
  warnings.warn(
/usr/lib/python3.8/site-packages/_pytest/pathlib.py:80: PytestWarning: (rm_rf) error removing /tmp/pytest-of-tkloczko/garbage-f1f3071b-83c8-46de-8bca-692999f05c54/test_safe_delete_no_perms0
<class 'OSError'>: [Errno 39] Directory not empty: 'test_safe_delete_no_perms0'
  warnings.warn(
/usr/lib/python3.8/site-packages/_pytest/pathlib.py:80: PytestWarning: (rm_rf) error removing /tmp/pytest-of-tkloczko/garbage-f1f3071b-83c8-46de-8bca-692999f05c54/test_safe_get_no_perms0
<class 'OSError'>: [Errno 39] Directory not empty: 'test_safe_get_no_perms0'
  warnings.warn(
/usr/lib/python3.8/site-packages/_pytest/pathlib.py:80: PytestWarning: (rm_rf) error removing /tmp/pytest-of-tkloczko/garbage-f1f3071b-83c8-46de-8bca-692999f05c54
<class 'OSError'>: [Errno 39] Directory not empty: '/tmp/pytest-of-tkloczko/garbage-f1f3071b-83c8-46de-8bca-692999f05c54'
  warnings.warn(
/usr/lib/python3.8/site-packages/_pytest/pathlib.py:80: PytestWarning: (rm_rf) error removing /tmp/pytest-of-tkloczko/garbage-cd6ec115-8e81-4461-858b-fb9d8e212f20/test_rmtree_errorhandler_reado0
<class 'OSError'>: [Errno 39] Directory not empty: 'test_rmtree_errorhandler_reado0'
  warnings.warn(
/usr/lib/python3.8/site-packages/_pytest/pathlib.py:80: PytestWarning: (rm_rf) error removing /tmp/pytest-of-tkloczko/garbage-cd6ec115-8e81-4461-858b-fb9d8e212f20/test_rmtree_errorhandler_rerai0
<class 'OSError'>: [Errno 39] Directory not empty: 'test_rmtree_errorhandler_rerai0'
  warnings.warn(
/usr/lib/python3.8/site-packages/_pytest/pathlib.py:80: PytestWarning: (rm_rf) error removing /tmp/pytest-of-tkloczko/garbage-cd6ec115-8e81-4461-858b-fb9d8e212f20/test_safe_get_no_perms0
<class 'OSError'>: [Errno 39] Directory not empty: 'test_safe_get_no_perms0'
  warnings.warn(
/usr/lib/python3.8/site-packages/_pytest/pathlib.py:80: PytestWarning: (rm_rf) error removing /tmp/pytest-of-tkloczko/garbage-cd6ec115-8e81-4461-858b-fb9d8e212f20/test_safe_set_no_perms0
<class 'OSError'>: [Errno 39] Directory not empty: 'test_safe_set_no_perms0'
  warnings.warn(
/usr/lib/python3.8/site-packages/_pytest/pathlib.py:80: PytestWarning: (rm_rf) error removing /tmp/pytest-of-tkloczko/garbage-cd6ec115-8e81-4461-858b-fb9d8e212f20/test_safe_delete_no_perms0
<class 'OSError'>: [Errno 39] Directory not empty: 'test_safe_delete_no_perms0'
  warnings.warn(
/usr/lib/python3.8/site-packages/_pytest/pathlib.py:80: PytestWarning: (rm_rf) error removing /tmp/pytest-of-tkloczko/garbage-cd6ec115-8e81-4461-858b-fb9d8e212f20
<class 'OSError'>: [Errno 39] Directory not empty: '/tmp/pytest-of-tkloczko/garbage-cd6ec115-8e81-4461-858b-fb9d8e212f20'
  warnings.warn(

Just retested and setuptools 57.5.0 still builds correctly in the same build env.

@fransklaver
Copy link

fransklaver commented Sep 6, 2021

Hi,

Mostly FYI, and I'm not trying to suggest that keeping crossenv working is up to you. Still the information might be useful.
So I am running into similar issues with a crossenv setup for aarch64, where a numpy install fails with the exact same error. I do come from an older version of setuptools, but it seems to me that once everything is updated, the older version shouldn't have any influence anymore.

It reproduces for me on python-3.8.8, I don't have a cross-built 3.9 on hand (yet).

It basically boils down to:

#!/bin/bash

buildpython=$1
hostpython=$2
  
tmpenv=$(mktemp -d)
crossenv=$(mktemp -d)

echo "Preparing initial crossenv venv"
$buildpython -m venv --clear $tmpenv
$tmpenv/bin/pip install --upgrade pip wheel setuptools crossenv

echo "generating cross-env python environment"
$tmpenv/bin/python -m crossenv $hostpython --clear $crossenv

$crossenv/bin/cross-pip install --upgrade pip wheel setuptools
$crossenv/bin/build-pip install --upgrade pip wheel setuptools
$crossenv/bin/build-pip install cython cffi
$crossenv/bin/cross-pip install numpy

# and cleanup again
rm -rf $crossenv
rm -rf $tmpenv

And the output until the first numpy failure (it retries):

Preparing initial crossenv venv
Collecting pip
  Using cached pip-21.2.4-py3-none-any.whl (1.6 MB)
Collecting wheel
  Using cached wheel-0.37.0-py2.py3-none-any.whl (35 kB)
Collecting setuptools
  Using cached setuptools-58.0.0-py3-none-any.whl (816 kB)
Collecting crossenv
  Using cached crossenv-1.1.4-py3-none-any.whl (28 kB)
Installing collected packages: pip, wheel, setuptools, crossenv
  Attempting uninstall: pip
    Found existing installation: pip 20.2.3
    Uninstalling pip-20.2.3:
      Successfully uninstalled pip-20.2.3
  Attempting uninstall: setuptools
    Found existing installation: setuptools 49.2.1
    Uninstalling setuptools-49.2.1:
      Successfully uninstalled setuptools-49.2.1
Successfully installed crossenv-1.1.4 pip-21.2.4 setuptools-58.0.0 wheel-0.37.0
generating cross-env python environment
Collecting pip
  Using cached pip-21.2.4-py3-none-any.whl (1.6 MB)
Collecting wheel
  Using cached wheel-0.37.0-py2.py3-none-any.whl (35 kB)
Collecting setuptools
  Using cached setuptools-58.0.0-py3-none-any.whl (816 kB)
Installing collected packages: pip, wheel, setuptools
  Attempting uninstall: pip
    Found existing installation: pip 20.2.3
    Uninstalling pip-20.2.3:
      Successfully uninstalled pip-20.2.3
  Attempting uninstall: setuptools
    Found existing installation: setuptools 49.2.1
    Uninstalling setuptools-49.2.1:
      Successfully uninstalled setuptools-49.2.1
Successfully installed pip-21.2.4 setuptools-58.0.0 wheel-0.37.0
Collecting pip
  Using cached pip-21.2.4-py3-none-any.whl (1.6 MB)
Collecting wheel
  Using cached wheel-0.37.0-py2.py3-none-any.whl (35 kB)
Collecting setuptools
  Using cached setuptools-58.0.0-py3-none-any.whl (816 kB)
Installing collected packages: pip, wheel, setuptools
  Attempting uninstall: pip
    Found existing installation: pip 20.2.3
    Uninstalling pip-20.2.3:
      Successfully uninstalled pip-20.2.3
  Attempting uninstall: setuptools
    Found existing installation: setuptools 49.2.1
    Uninstalling setuptools-49.2.1:
      Successfully uninstalled setuptools-49.2.1
Successfully installed pip-21.2.4 setuptools-58.0.0 wheel-0.37.0
Collecting cython
  Using cached Cython-0.29.24-cp38-cp38-manylinux1_x86_64.whl (1.9 MB)
Collecting cffi
  Using cached cffi-1.14.6-cp38-cp38-manylinux1_x86_64.whl (411 kB)
Collecting pycparser
  Using cached pycparser-2.20-py2.py3-none-any.whl (112 kB)
Installing collected packages: pycparser, cython, cffi
Successfully installed cffi-1.14.6 cython-0.29.24 pycparser-2.20
Collecting numpy
  Using cached numpy-1.21.2.zip (10.3 MB)
  Installing build dependencies ... done
  Getting requirements to build wheel ... error
  ERROR: Command errored out with exit status 1:
   command: /tmp/tmp.qy5LolDavD/cross/bin/python /tmp/tmp.qy5LolDavD/build/lib/python3.8/site-packages/pip/_vendor/pep517/in_process/_in_process.py get_requires_for_build_wheel /tmp/tmpspvqwyg9
       cwd: /tmp/pip-install-u_lblyd1/numpy_db56c39523754d9da4e849d605d03590
  Complete output (44 lines):
  Running from numpy source directory.
  Traceback (most recent call last):
    File "/tmp/tmp.qy5LolDavD/build/lib/python3.8/site-packages/pkg_resources/__init__.py", line 2458, in resolve
      return functools.reduce(getattr, self.attrs, module)
  AttributeError: type object 'Distribution' has no attribute '_finalize_2to3_doctests'
  
  The above exception was the direct cause of the following exception:
  
  Traceback (most recent call last):
    File "/tmp/tmp.qy5LolDavD/build/lib/python3.8/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 349, in <module>
      main()
    File "/tmp/tmp.qy5LolDavD/build/lib/python3.8/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 331, in main
      json_out['return_val'] = hook(**hook_input['kwargs'])
    File "/tmp/tmp.qy5LolDavD/build/lib/python3.8/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 117, in get_requires_for_build_wheel
      return hook(config_settings)
    File "/tmp/tmp.qy5LolDavD/build/lib/python3.8/site-packages/setuptools/build_meta.py", line 154, in get_requires_for_build_wheel
      return self._get_build_requires(
    File "/tmp/tmp.qy5LolDavD/build/lib/python3.8/site-packages/setuptools/build_meta.py", line 135, in _get_build_requires
      self.run_setup()
    File "/tmp/tmp.qy5LolDavD/build/lib/python3.8/site-packages/setuptools/build_meta.py", line 258, in run_setup
      super(_BuildMetaLegacyBackend,
    File "/tmp/tmp.qy5LolDavD/build/lib/python3.8/site-packages/setuptools/build_meta.py", line 150, in run_setup
      exec(compile(code, __file__, 'exec'), locals())
    File "setup.py", line 448, in <module>
      setup_package()
    File "setup.py", line 440, in setup_package
      setup(**metadata)
    File "/tmp/tmp.qy5LolDavD/build/lib/python3.8/site-packages/setuptools/__init__.py", line 153, in setup
      return distutils.core.setup(**attrs)
    File "/opt/build-support/lib/python3.8/distutils/core.py", line 108, in setup
      _setup_distribution = dist = klass(attrs)
    File "/tmp/tmp.qy5LolDavD/build/lib/python3.8/site-packages/setuptools/dist.py", line 446, in __init__
      _Distribution.__init__(
    File "/opt/build-support/lib/python3.8/distutils/dist.py", line 292, in __init__
      self.finalize_options()
    File "/tmp/tmp.qy5LolDavD/build/lib/python3.8/site-packages/setuptools/dist.py", line 821, in finalize_options
      for ep in sorted(eps, key=by_order):
    File "/tmp/tmp.qy5LolDavD/build/lib/python3.8/site-packages/setuptools/dist.py", line 820, in <lambda>
      eps = map(lambda e: e.load(), pkg_resources.iter_entry_points(group))
    File "/tmp/tmp.qy5LolDavD/build/lib/python3.8/site-packages/pkg_resources/__init__.py", line 2450, in load
      return self.resolve()
    File "/tmp/tmp.qy5LolDavD/build/lib/python3.8/site-packages/pkg_resources/__init__.py", line 2460, in resolve
      raise ImportError(str(exc)) from exc
  ImportError: type object 'Distribution' has no attribute '_finalize_2to3_doctests'
  ----------------------------------------

Hope this helps rather than confuses.

@jaraco
Copy link
Member

jaraco commented Sep 6, 2021

I am running into similar issues with a crossenv setup...

Hope this helps rather than confuses.

Not your fault, but I have zero experience with crossenv, so it's not at all apparent what's going on above.

I suspect, though, that crossenv is doing something similar to what pip-run is doing - using PYTHONPATH to manipulate the presence of certain dependencies. With all these layers of isolation, it's really difficult to discern what factors trigger the behavior. Given this additional use-case, I'm now convinced a workaround in Setuptools is needed.

@jaraco
Copy link
Member

jaraco commented Sep 6, 2021

pytest shows some new issues

Those issues should be reported separately.

@fransklaver
Copy link

fransklaver commented Sep 6, 2021

Not your fault, but I have zero experience with crossenv, so it's not at all apparent what's going on above.

Can't blame you for that.

I suspect, though, that crossenv is doing something similar to what pip-run is doing - using PYTHONPATH to manipulate the presence of certain dependencies. With all these layers of isolation, it's really difficult to discern what factors trigger the behavior. Given this additional use-case, I'm now convinced a workaround in Setuptools is needed.

crossenv is a bit of a beast. In the example above I create a python env to install and setup crossenv. Crossenv then builds its own environment, but needs two of them, one to build the packages (build-*) and one to actually install in the target environment (cross-*). I'm sure your gut feeling about it is close to how it really works. I'm looking forward to an update to check.

Thanks.

jaraco added a commit that referenced this issue Sep 6, 2021
… for a year to avoid issues with older Setuptools. Fixes #2765.
@kloczek
Copy link
Author

kloczek commented Sep 6, 2021

What about pytest failures?
Should I open separated ticket?

@jaraco
Copy link
Member

jaraco commented Sep 6, 2021

What about pytest failures?
Should I open separated ticket?

Yes, please. Note that the errors aren't occurring on CI, so I'll need your assistance identifying the factors unique to your environment that lead to the failures.

@fransklaver
Copy link

Builds work again for me. Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Needs Triage Issues that need to be evaluated for severity and status.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants