You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is a bit of a minor issue that you can ignore and close if you think it's irrelevant :-)
The issue:
I included the manpage build instructions for my pyproject.toml file as recommended here and it all works fine if I do a local pip-install:
(bidscoin) marzwi@localhost:~/bidscoin> pip install .Processing /home/marzwi/bidscoin Installing build dependencies ... done Getting requirements to build wheel ... done Preparing metadata (pyproject.toml) ... done[..]Building wheels for collected packages: bidscoin Building wheel for bidscoin (pyproject.toml) ... done Created wheel for bidscoin: filename=bidscoin-4.1.1-py3-none-any.whl size=686401 sha256=[..] Stored in directory: /tmp/pip-ephem-wheel-cache-[..]Successfully built bidscoinInstalling collected packages: bidscoinSuccessfully installed bidscoin-4.1.1
However, if I run it again (e.g. after making some edits to my code) I get this error -- unless I first remove the newly generated man folder that is created in the cwd in the previous step:
(bidscoin) marzwi@localhost:~/bidscoin> pip install .Processing /home/marzwi/bidscoin Installing build dependencies ... done Getting requirements to build wheel ... error error: subprocess-exited-with-error × Getting requirements to build wheel did not run successfully. │ exit code: 1 ╰─> [91 lines of output] No `packages` or `py_modules` configuration, performing automatic discovery. `flat-layout` detected -- analysing . discovered packages -- ['bidscoin', 'man', 'bidscoin.bidsapps', 'bidscoin.cli', 'bidscoin.heuristics', 'bidscoin.plugins', 'bidscoin.schema', 'bidscoin.utilities', 'bidscoin.schema.meta', 'bidscoin.schema.objects', 'bidscoin.schema.rules', 'bidscoin.schema.rules.checks', 'bidscoin.schema.rules.files', 'bidscoin.schema.rules.sidecars', 'bidscoin.schema.rules.tabular_data', 'bidscoin.schema.rules.files.common', 'bidscoin.schema.rules.files.deriv', 'bidscoin.schema.rules.files.raw', 'bidscoin.schema.rules.sidecars.derivatives', 'bidscoin.schema.rules.tabular_data.derivatives'] Traceback (most recent call last): File "/home/marzwi/miniconda3/envs/bidscoin/lib/python3.11/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 353, in <module> main() File "/home/marzwi/miniconda3/envs/bidscoin/lib/python3.11/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 335, in main json_out['return_val'] = hook(**hook_input['kwargs']) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/marzwi/miniconda3/envs/bidscoin/lib/python3.11/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 118, in get_requires_for_build_wheel return hook(config_settings) ^^^^^^^^^^^^^^^^^^^^^ File "/tmp/pip-build-env-f2d0u5il/overlay/lib/python3.11/site-packages/setuptools/build_meta.py", line 355, in get_requires_for_build_wheel return self._get_build_requires(config_settings, requirements=['wheel']) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/tmp/pip-build-env-f2d0u5il/overlay/lib/python3.11/site-packages/setuptools/build_meta.py", line 325, in _get_build_requires self.run_setup() File "/tmp/pip-build-env-f2d0u5il/overlay/lib/python3.11/site-packages/setuptools/build_meta.py", line 341, in run_setup exec(code, locals()) File "<string>", line 3, in <module> File "/tmp/pip-build-env-f2d0u5il/overlay/lib/python3.11/site-packages/setuptools/__init__.py", line 103, in setup return distutils.core.setup(**attrs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/tmp/pip-build-env-f2d0u5il/overlay/lib/python3.11/site-packages/setuptools/_distutils/core.py", line 159, in setup dist.parse_config_files() File "/tmp/pip-build-env-f2d0u5il/overlay/lib/python3.11/site-packages/setuptools/dist.py", line 653, in parse_config_files pyprojecttoml.apply_configuration(self, filename, ignore_option_errors) File "/tmp/pip-build-env-f2d0u5il/overlay/lib/python3.11/site-packages/setuptools/config/pyprojecttoml.py", line 66, in apply_configuration config = read_configuration(filepath, True, ignore_option_errors, dist) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/tmp/pip-build-env-f2d0u5il/overlay/lib/python3.11/site-packages/setuptools/config/pyprojecttoml.py", line 131, in read_configuration return expand_configuration(asdict, root_dir, ignore_option_errors, dist) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/tmp/pip-build-env-f2d0u5il/overlay/lib/python3.11/site-packages/setuptools/config/pyprojecttoml.py", line 156, in expand_configuration return _ConfigExpander(config, root_dir, ignore_option_errors, dist).expand() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/tmp/pip-build-env-f2d0u5il/overlay/lib/python3.11/site-packages/setuptools/config/pyprojecttoml.py", line 203, in expand self._expand_cmdclass(package_dir) File "/tmp/pip-build-env-f2d0u5il/overlay/lib/python3.11/site-packages/setuptools/config/pyprojecttoml.py", line 228, in _expand_cmdclass self._process_field(self.setuptools_cfg, "cmdclass", cmdclass) File "/tmp/pip-build-env-f2d0u5il/overlay/lib/python3.11/site-packages/setuptools/config/pyprojecttoml.py", line 186, in _process_field container[field] = fn(container[field]) ^^^^^^^^^^^^^^^^^^^^ File "/tmp/pip-build-env-f2d0u5il/overlay/lib/python3.11/site-packages/setuptools/config/expand.py", line 278, in cmdclass return {k: resolve_class(v, package_dir, root_dir) for k, v in values.items()} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/tmp/pip-build-env-f2d0u5il/overlay/lib/python3.11/site-packages/setuptools/config/expand.py", line 278, in <dictcomp> return {k: resolve_class(v, package_dir, root_dir) for k, v in values.items()} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/tmp/pip-build-env-f2d0u5il/overlay/lib/python3.11/site-packages/setuptools/config/expand.py", line 265, in resolve_class _parent_path, path, module_name = _find_module(pkg_name, package_dir, root_dir) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/tmp/pip-build-env-f2d0u5il/overlay/lib/python3.11/site-packages/setuptools/config/expand.py", line 230, in _find_module if package_dir: File "/tmp/pip-build-env-f2d0u5il/overlay/lib/python3.11/site-packages/setuptools/config/expand.py", line 460, in __len__ return len(self._target()) ^^^^^^^^^^^^^^ File "/tmp/pip-build-env-f2d0u5il/overlay/lib/python3.11/site-packages/setuptools/config/expand.py", line 453, in _target self._value = self._obtain() ^^^^^^^^^^^^^^ File "/tmp/pip-build-env-f2d0u5il/overlay/lib/python3.11/site-packages/setuptools/config/expand.py", line 423, in _get_package_dir self() File "/tmp/pip-build-env-f2d0u5il/overlay/lib/python3.11/site-packages/setuptools/config/expand.py", line 413, in __call__ self._dist.set_defaults(name=False) # Skip name, we can still be parsing ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/tmp/pip-build-env-f2d0u5il/overlay/lib/python3.11/site-packages/setuptools/discovery.py", line 353, in __call__ self._analyse_package_layout(ignore_ext_modules) File "/tmp/pip-build-env-f2d0u5il/overlay/lib/python3.11/site-packages/setuptools/discovery.py", line 387, in _analyse_package_layout or self._analyse_flat_layout() ^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/tmp/pip-build-env-f2d0u5il/overlay/lib/python3.11/site-packages/setuptools/discovery.py", line 444, in _analyse_flat_layout return self._analyse_flat_packages() or self._analyse_flat_modules() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/tmp/pip-build-env-f2d0u5il/overlay/lib/python3.11/site-packages/setuptools/discovery.py", line 450, in _analyse_flat_packages self._ensure_no_accidental_inclusion(top_level, "packages") File "/tmp/pip-build-env-f2d0u5il/overlay/lib/python3.11/site-packages/setuptools/discovery.py", line 480, in _ensure_no_accidental_inclusion raise PackageDiscoveryError(cleandoc(msg)) setuptools.errors.PackageDiscoveryError: Multiple top-level packages discovered in a flat-layout: ['man', 'bidscoin']. 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. [end of output] note: This error originates from a subprocess, and is likely not a problem with pip.error: subprocess-exited-with-error× Getting requirements to build wheel did not run successfully.│ exit code: 1╰─> See above for output.note: This error originates from a subprocess, and is likely not a problem with pip.
So the manpages have to be removed or overwritten, then all is fine
The text was updated successfully, but these errors were encountered:
I am happy to test things (but anyone can easily reproduce the error), but I don't know how to do so. For instance, I know that argeparse-manpage is used during the build process but I have no idea where it is installed / how to use a locally modified version of argeparse-manpage
This is a bit of a minor issue that you can ignore and close if you think it's irrelevant :-)
The issue:
I included the manpage build instructions for my
pyproject.toml
file as recommended here and it all works fine if I do a local pip-install:However, if I run it again (e.g. after making some edits to my code) I get this error -- unless I first remove the newly generated
man
folder that is created in the cwd in the previous step:So the manpages have to be removed or overwritten, then all is fine
The text was updated successfully, but these errors were encountered: