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

Project no longer builds #218

Closed
jaraco opened this issue Jan 5, 2023 · 1 comment
Closed

Project no longer builds #218

jaraco opened this issue Jan 5, 2023 · 1 comment

Comments

@jaraco
Copy link
Contributor

jaraco commented Jan 5, 2023

Attempting to run tox against the main branch fails:

 requests-mock master $ tox
.pkg: _optional_hooks> python /Users/jaraco/.local/pipx/venvs/tox/lib/python3.11/site-packages/pyproject_api/_backend.py True setuptools.build_meta __legacy__
.pkg: get_requires_for_build_sdist> python /Users/jaraco/.local/pipx/venvs/tox/lib/python3.11/site-packages/pyproject_api/_backend.py True setuptools.build_meta __legacy__
.pkg: prepare_metadata_for_build_wheel> python /Users/jaraco/.local/pipx/venvs/tox/lib/python3.11/site-packages/pyproject_api/_backend.py True setuptools.build_meta __legacy__
.pkg: build_sdist> python /Users/jaraco/.local/pipx/venvs/tox/lib/python3.11/site-packages/pyproject_api/_backend.py True setuptools.build_meta __legacy__
python: packaging backend failed (code=error: Multiple top-level packages discovered in a flat-layout: ['releasenotes', 'requests_mock'].

To avoid accidental inclusion of unwanted files or directories,
setuptools will not proceed with this build.

If you are trying to create a single distribution with multiple packages
on purpose, you should not rely on automatic discovery.
Instead, consider the following options:

1. set up custom discovery (`find` directive with `include` or `exclude`)
2. use a `src-layout`
3. explicitly set `py_modules` or `packages` with a list of names

To find more information, look for "package discovery" on setuptools docs.), with SystemExit: error: Multiple top-level packages discovered in a flat-layout: ['releasenotes', 'requests_mock'].

To avoid accidental inclusion of unwanted files or directories,
setuptools will not proceed with this build.

If you are trying to create a single distribution with multiple packages
on purpose, you should not rely on automatic discovery.
Instead, consider the following options:

1. set up custom discovery (`find` directive with `include` or `exclude`)
2. use a `src-layout`
3. explicitly set `py_modules` or `packages` with a list of names

To find more information, look for "package discovery" on setuptools docs.
/Users/jaraco/code/jamielennox/requests-mock/.tox/.pkg/lib/python3.11/site-packages/setuptools/config/setupcfg.py:508: SetuptoolsDeprecationWarning: The license_file parameter is deprecated, use license_files instead.
  warnings.warn(msg, warning_class)
Traceback (most recent call last):
  File "/Users/jaraco/code/jamielennox/requests-mock/.tox/.pkg/lib/python3.11/site-packages/setuptools/_distutils/core.py", line 201, in run_commands
    dist.run_commands()
  File "/Users/jaraco/code/jamielennox/requests-mock/.tox/.pkg/lib/python3.11/site-packages/setuptools/_distutils/dist.py", line 969, in run_commands
    self.run_command(cmd)
  File "/Users/jaraco/code/jamielennox/requests-mock/.tox/.pkg/lib/python3.11/site-packages/setuptools/dist.py", line 1204, in run_command
    self.set_defaults()
  File "/Users/jaraco/code/jamielennox/requests-mock/.tox/.pkg/lib/python3.11/site-packages/setuptools/discovery.py", line 340, in __call__
    self._analyse_package_layout(ignore_ext_modules)
  File "/Users/jaraco/code/jamielennox/requests-mock/.tox/.pkg/lib/python3.11/site-packages/setuptools/discovery.py", line 373, in _analyse_package_layout
    or self._analyse_flat_layout()
       ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/jaraco/code/jamielennox/requests-mock/.tox/.pkg/lib/python3.11/site-packages/setuptools/discovery.py", line 430, in _analyse_flat_layout
    return self._analyse_flat_packages() or self._analyse_flat_modules()
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/jaraco/code/jamielennox/requests-mock/.tox/.pkg/lib/python3.11/site-packages/setuptools/discovery.py", line 436, in _analyse_flat_packages
    self._ensure_no_accidental_inclusion(top_level, "packages")
  File "/Users/jaraco/code/jamielennox/requests-mock/.tox/.pkg/lib/python3.11/site-packages/setuptools/discovery.py", line 466, in _ensure_no_accidental_inclusion
    raise PackageDiscoveryError(cleandoc(msg))
setuptools.errors.PackageDiscoveryError: Multiple top-level packages discovered in a flat-layout: ['releasenotes', 'requests_mock'].

To avoid accidental inclusion of unwanted files or directories,
setuptools will not proceed with this build.

If you are trying to create a single distribution with multiple packages
on purpose, you should not rely on automatic discovery.
Instead, consider the following options:

1. set up custom discovery (`find` directive with `include` or `exclude`)
2. use a `src-layout`
3. explicitly set `py_modules` or `packages` with a list of names

To find more information, look for "package discovery" on setuptools docs.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/Users/jaraco/.local/pipx/venvs/tox/lib/python3.11/site-packages/pyproject_api/_backend.py", line 90, in run
    outcome = backend_proxy(parsed_message["cmd"], **parsed_message["kwargs"])
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/jaraco/.local/pipx/venvs/tox/lib/python3.11/site-packages/pyproject_api/_backend.py", line 32, in __call__
    return getattr(on_object, name)(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/jaraco/code/jamielennox/requests-mock/.tox/.pkg/lib/python3.11/site-packages/setuptools/build_meta.py", line 417, in build_sdist
    return self._build_with_temp_dir(['sdist', '--formats', 'gztar'],
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/jaraco/code/jamielennox/requests-mock/.tox/.pkg/lib/python3.11/site-packages/setuptools/build_meta.py", line 398, in _build_with_temp_dir
    self.run_setup()
  File "/Users/jaraco/code/jamielennox/requests-mock/.tox/.pkg/lib/python3.11/site-packages/setuptools/build_meta.py", line 485, in run_setup
    self).run_setup(setup_script=setup_script)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/jaraco/code/jamielennox/requests-mock/.tox/.pkg/lib/python3.11/site-packages/setuptools/build_meta.py", line 335, in run_setup
    exec(code, locals())
  File "<string>", line 5, in <module>
  File "/Users/jaraco/code/jamielennox/requests-mock/.tox/.pkg/lib/python3.11/site-packages/setuptools/__init__.py", line 87, in setup
    return distutils.core.setup(**attrs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/jaraco/code/jamielennox/requests-mock/.tox/.pkg/lib/python3.11/site-packages/setuptools/_distutils/core.py", line 185, in setup
    return run_commands(dist)
           ^^^^^^^^^^^^^^^^^^
  File "/Users/jaraco/code/jamielennox/requests-mock/.tox/.pkg/lib/python3.11/site-packages/setuptools/_distutils/core.py", line 215, in run_commands
    raise SystemExit("error: " + str(msg))
SystemExit: error: Multiple top-level packages discovered in a flat-layout: ['releasenotes', 'requests_mock'].

To avoid accidental inclusion of unwanted files or directories,
setuptools will not proceed with this build.

If you are trying to create a single distribution with multiple packages
on purpose, you should not rely on automatic discovery.
Instead, consider the following options:

1. set up custom discovery (`find` directive with `include` or `exclude`)
2. use a `src-layout`
3. explicitly set `py_modules` or `packages` with a list of names

To find more information, look for "package discovery" on setuptools docs.
Backend: run command build_sdist with args {'sdist_directory': '/Users/jaraco/code/jamielennox/requests-mock/.tox/.pkg/dist', 'config_settings': None}
Backend: Wrote response {'code': 'error: Multiple top-level packages discovered in a flat-layout: [\'releasenotes\', \'requests_mock\'].\n\nTo avoid accidental inclusion of unwanted files or directories,\nsetuptools will not proceed with this build.\n\nIf you are trying to create a single distribution with multiple packages\non purpose, you should not rely on automatic discovery.\nInstead, consider the following options:\n\n1. set up custom discovery (`find` directive with `include` or `exclude`)\n2. use a `src-layout`\n3. explicitly set `py_modules` or `packages` with a list of names\n\nTo find more information, look for "package discovery" on setuptools docs.', 'exc_type': 'SystemExit', 'exc_msg': 'error: Multiple top-level packages discovered in a flat-layout: [\'releasenotes\', \'requests_mock\'].\n\nTo avoid accidental inclusion of unwanted files or directories,\nsetuptools will not proceed with this build.\n\nIf you are trying to create a single distribution with multiple packages\non purpose, you should not rely on automatic discovery.\nInstead, consider the following options:\n\n1. set up custom discovery (`find` directive with `include` or `exclude`)\n2. use a `src-layout`\n3. explicitly set `py_modules` or `packages` with a list of names\n\nTo find more information, look for "package discovery" on setuptools docs.'} to /var/folders/sx/n5gkrgfx6zd91ymxr2sr9wvw00n8zm/T/pep517_build_sdist-6b5k5rc9.json
.pkg: _exit> python /Users/jaraco/.local/pipx/venvs/tox/lib/python3.11/site-packages/pyproject_api/_backend.py True setuptools.build_meta __legacy__
  python: FAIL code error: Multiple top-level packages discovered in a flat-layout: ['releasenotes', 'requests_mock'].

To avoid accidental inclusion of unwanted files or directories,
setuptools will not proceed with this build.

If you are trying to create a single distribution with multiple packages
on purpose, you should not rely on automatic discovery.
Instead, consider the following options:

1. set up custom discovery (`find` directive with `include` or `exclude`)
2. use a `src-layout`
3. explicitly set `py_modules` or `packages` with a list of names

To find more information, look for "package discovery" on setuptools docs. (0.80 seconds)
  evaluation failed :( (0.84 seconds)
error: Multiple top-level packages discovered in a flat-layout: ['releasenotes', 'requests_mock'].

To avoid accidental inclusion of unwanted files or directories,
setuptools will not proceed with this build.

If you are trying to create a single distribution with multiple packages
on purpose, you should not rely on automatic discovery.
Instead, consider the following options:

1. set up custom discovery (`find` directive with `include` or `exclude`)
2. use a `src-layout`
3. explicitly set `py_modules` or `packages` with a list of names

To find more information, look for "package discovery" on setuptools docs.
jaraco added a commit to jaraco/requests-mock that referenced this issue Jan 5, 2023
… config in setup.cfg. Run all tests using pytest. Fixes jamielennox#218.
jaraco added a commit to jaraco/requests-mock that referenced this issue Jan 5, 2023
… config in setup.cfg. Run all tests using pytest. Fixes jamielennox#218.
jaraco added a commit to jaraco/requests-mock that referenced this issue Jan 5, 2023
… config in setup.cfg. Run all tests using pytest. Fixes jamielennox#218.
jamielennox pushed a commit that referenced this issue Jan 22, 2024
@jaraco
Copy link
Contributor Author

jaraco commented Jan 22, 2024

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant