-
Notifications
You must be signed in to change notification settings - Fork 16
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
Package according modern guidelines #32
Conversation
Hi @BramVanroy! Could you please have a look? |
Hi there! You're definitely right that this package could use a refactor and bump to new standards. We can/should probably also deprecate support for earlier python versions that are approaching EOL. That said, I'm not a hatchling person (just setuptools works best for me) so I rather not merge this as it is now. If you can refactor to use plain setuptools (example: https://github.com/BramVanroy/dutch-instruction-datasets/) I can reconsider. Or I can do it over summer if you can wait that long. Thanks |
closes BramVanroy#31 Project repackaged accoding modern Python packaging guidelines: https://packaging.python.org/en/latest/ The main reason for repackaging is that previously it was not possible to build/install package in virtualenv when spacy was not installed in system environment, because `setup.py` imported all project modules indirectly through importing `__init__.py`: ``` $ python3 -m venv .venv $ source .venv/bin/activate $ pip install . Processing /home/rominf/dev/spacy_conll 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 ╰─> [24 lines of output] Traceback (most recent call last): File "/usr/lib/python3.12/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 353, in <module> main() File "/usr/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 "/usr/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-tbqma0n0/overlay/lib/python3.12/site-packages/setuptools/build_meta.py", line 325, in get_requires_for_build_wheel return self._get_build_requires(config_settings, requirements=['wheel']) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/tmp/pip-build-env-tbqma0n0/overlay/lib/python3.12/site-packages/setuptools/build_meta.py", line 295, in _get_build_requires self.run_setup() File "/tmp/pip-build-env-tbqma0n0/overlay/lib/python3.12/site-packages/setuptools/build_meta.py", line 487, in run_setup super().run_setup(setup_script=setup_script) File "/tmp/pip-build-env-tbqma0n0/overlay/lib/python3.12/site-packages/setuptools/build_meta.py", line 311, in run_setup exec(code, locals()) File "<string>", line 4, in <module> File "/home/rominf/dev/spacy_conll/spacy_conll/__init__.py", line 3, in <module> from .formatter import ConllFormatter File "/home/rominf/dev/spacy_conll/spacy_conll/formatter.py", line 5, in <module> from spacy.language import Language ModuleNotFoundError: No module named 'spacy' [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. ``` Replace supported Python versions with actual. Also, switch to dynamic versioning based on git tags, see: https://setuptools-scm.readthedocs.io/en/stable
I replaced hatch(ling) with setuptools as you suggested and updated Python versions. Also, I moved source to |
Hi @BramVanroy! Is there something else I need to do here so that you reconsider? |
Thanks a lot @rominf! |
What does this PR do?
See commit messages and linked issue for more details.
Fixes #31
Before submitting, make sure that you can tick all these boxes.
dev
branch?dev
branch is out-of-date, hence usingmaster
.Not applicable.
Not applicable.
pytest tests/
?make style
andmake quality