Open oruebel opened 10 months ago
@mavaylon1 since you dealt with moving to pyproject.toml
and replacing versioneer
on the other repos, could you do this for this repo as well. This not a high pressure issue right now, but would be nice to do in the next few month.
Can do
Versioneer is no longer supported and we have stopped using it in other NWB/HDMF repos.
It seems like it is blocking the use of nwb-project-analytics with Python 3.12. I don't think we need to use it here because this package is not released on PyPI and does not need to be specially versioned. I also think we do not need to release this package on PyPI.
Collecting git+https://github.com/NeurodataWithoutBorders/nwb-project-analytics.git (from -r requirements.txt (line 7))
Cloning https://github.com/NeurodataWithoutBorders/nwb-project-analytics.git to /tmp/pip-req-build-4_8ln0gg
Running command git clone --filter=blob:none --quiet https://github.com/NeurodataWithoutBorders/nwb-project-analytics.git /tmp/pip-req-build-4_8ln0gg
Resolved https://github.com/NeurodataWithoutBorders/nwb-project-analytics.git to commit bb6d29310d37c2eb86b27a9a5160ad93d76971b5
Installing build dependencies: started
Installing build dependencies: finished with status 'done'
Getting requirements to build wheel: started
Getting requirements to build wheel: finished with status 'error'
error: subprocess-exited-with-error
× Getting requirements to build wheel did not run successfully.
│ exit code: 1
╰─> [33 lines of output]
/tmp/pip-req-build-4_8ln0gg/versioneer.py:422: SyntaxWarning: invalid escape sequence '\s'
LONG_VERSION_PY['git'] = '''
found these packages: ['nwb_project_analytics']
['numpy', 'pandas', 'ruamel.yaml', 'GitPython', 'PyGithub', 'setuptools', 'matplotlib', 'tqdm', 'requests', 'hdmf-docutils', 'cloc']
Traceback (most recent call last):
File "/opt/hostedtoolcache/Python/3.[12](https://github.com/NeurodataWithoutBorders/nwb-overview/actions/runs/9920899609/job/27408270362?pr=165#step:5:13).4/x64/lib/python3.12/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 353, in <module>
main()
File "/opt/hostedtoolcache/Python/3.12.4/x64/lib/python3.12/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 335, in main
json_out['return_val'] = hook(**hook_input['kwargs'])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/hostedtoolcache/Python/3.12.4/x64/lib/python3.12/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-wuy8opvx/overlay/lib/python3.12/site-packages/setuptools/build_meta.py", line 327, in get_requires_for_build_wheel
return self._get_build_requires(config_settings, requirements=[])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/tmp/pip-build-env-wuy8opvx/overlay/lib/python3.12/site-packages/setuptools/build_meta.py", line 297, in _get_build_requires
self.run_setup()
File "/tmp/pip-build-env-wuy8opvx/overlay/lib/python3.12/site-packages/setuptools/build_meta.py", line 497, in run_setup
super().run_setup(setup_script=setup_script)
File "/tmp/pip-build-env-wuy8opvx/overlay/lib/python3.12/site-packages/setuptools/build_meta.py", line 3[13](https://github.com/NeurodataWithoutBorders/nwb-overview/actions/runs/9920899609/job/27408270362?pr=165#step:5:14), in run_setup
exec(code, locals())
File "<string>", line 36, in <module>
File "/tmp/pip-req-build-4_8ln0gg/versioneer.py", line 1540, in get_version
return get_versions()["version"]
^^^^^^^^^^^^^^
File "/tmp/pip-req-build-4_8ln0gg/versioneer.py", line [14](https://github.com/NeurodataWithoutBorders/nwb-overview/actions/runs/9920899609/job/27408270362?pr=165#step:5:15)72, in get_versions
cfg = get_config_from_root(root)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/tmp/pip-req-build-4_8ln0gg/versioneer.py", line 343, in get_config_from_root
parser = configparser.SafeConfigParser()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: module 'configparser' has no attribute 'SafeConfigParser'. Did you mean: 'RawConfigParser'?
[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.
FWIW there is 3.12 support in versioneer, might be just not released? https://github.com/python-versioneer/python-versioneer/blob/master/pyproject.toml
Just use master version?
I see. The latest versioneer indeed supports 3.12, but personally I prefer to have one fewer script to maintain. If we want dynamic versioning, I suggest we use hatch-vcs which we use in pynwb/hdmf (it's slightly different but does enough of the job).
A related issue is that the repo currently lists requirements in two places:
and
In #19 I added dandi to the requirements.txt
but not setup.py
which in turn broke the build for the nwb-overview website. It would be nice to have requirements maintained in a single place.
pyproject.toml
instead ofsetup.py