Skip to content

.tmpl files missing in new release .tar.gz #2498

Closed
@mgorny

Description

@mgorny

setuptools-51.1.0.post20201221.tar.gz seems to be missing the .tmpl files. As a result, tests fail:

_____________________________________________________ TestEasyInstallTest.test_script_install _____________________________________________________

self = <setuptools.tests.test_easy_install.TestEasyInstallTest object at 0x000055e0e1c3b088>
sdist_script = '/tmp/portage/dev-python/setuptools-51.1.0_p20201221/temp/pytest-of-portage/pytest-0/test_script_install0/setuptools-test-script-1.0.zip'
tmpdir = local('/tmp/portage/dev-python/setuptools-51.1.0_p20201221/temp/pytest-of-portage/pytest-0/test_script_install0')
monkeypatch = <_pytest.monkeypatch.MonkeyPatch object at 0x000055e0e1c3b830>

    @pytest.mark.skipif(not sys.platform.startswith('linux'),
                        reason="Test can only be run on Linux")
    def test_script_install(self, sdist_script, tmpdir, monkeypatch):
        """
        Check scripts are installed.
        """
        dist = Distribution({'script_args': ['easy_install']})
        target = (tmpdir / 'target').ensure_dir()
        cmd = ei.easy_install(
            dist,
            install_dir=str(target),
            args=['x'],
        )
        monkeypatch.setitem(os.environ, 'PYTHONPATH', str(target))
        cmd.ensure_finalized()
>       cmd.easy_install(sdist_script)

setuptools/tests/test_easy_install.py:267: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
setuptools/command/easy_install.py:650: in easy_install
    return self.install_item(None, spec, tmpdir, deps, True)
setuptools/command/easy_install.py:697: in install_item
    self.process_distribution(spec, dist, deps)
setuptools/command/easy_install.py:722: in process_distribution
    self.install_egg_scripts(dist)
setuptools/command/easy_install.py:599: in install_egg_scripts
    dist.get_metadata('scripts/' + script_name)
setuptools/command/easy_install.py:799: in install_script
    body = self._load_template(dev_path) % locals()
setuptools/command/easy_install.py:815: in _load_template
    raw_bytes = resource_string('setuptools', name)
build/test/lib/pkg_resources/__init__.py:1141: in resource_string
    self, resource_name
build/test/lib/pkg_resources/__init__.py:1386: in get_resource_string
    return self._get(self._fn(self.module_path, resource_name))
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <pkg_resources.DefaultProvider object at 0x00007f679b7580c8>
path = '/tmp/portage/dev-python/setuptools-51.1.0_p20201221/work/setuptools-51.1.0.post20201221-pypy3/setuptools/script.tmpl'

    def _get(self, path):
>       with open(path, 'rb') as stream:
E       FileNotFoundError: [Errno 2] No such file or directory: '/tmp/portage/dev-python/setuptools-51.1.0_p20201221/work/setuptools-51.1.0.post20201221-pypy3/setuptools/script.tmpl'

build/test/lib/pkg_resources/__init__.py:1609: FileNotFoundError
-------------------------------------------------------------- Captured stdout call ---------------------------------------------------------------
Processing setuptools-test-script-1.0.zip
Writing /tmp/portage/dev-python/setuptools-51.1.0_p20201221/temp/easy_install-zph14rrk/setup.cfg
Running setup.py -q bdist_egg --dist-dir /tmp/portage/dev-python/setuptools-51.1.0_p20201221/temp/easy_install-zph14rrk/egg-dist-tmp-z3lf1g7i
Moving setuptools_test_script-1.0-py3.7.egg to /tmp/portage/dev-python/setuptools-51.1.0_p20201221/temp/pytest-of-portage/pytest-0/test_script_install0/target
Adding setuptools-test-script 1.0 to easy-install.pth file
-------------------------------------------------------------- Captured stderr call ---------------------------------------------------------------
warning: install_lib: 'build/lib' does not exist -- no Python modules to install

zip_safe flag not set; analyzing archive contents...

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions