-
Notifications
You must be signed in to change notification settings - Fork 2.1k
[#8382] Packaging updates in the extensions template #8456
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
Conversation
Fixes #8316 In our post_gen_project hook, we were dumping the cookiecutter object as a Python object but using the `jsonify` filter. Cookicutter 2.6 introduced a new item in the context which is None by default, and this got translated as `null` when dumping it, which is not valid Python syntax. I've refactored the hook a bit so it dumps the context in a bit more safely manner.
* Remove instances of deprecated `python setup.py develop` and `python setup.py sdist upload` * Don't recommend editable installs unless it's a development install
Moved all project information there except for: * setuptools config options, that go to setup.cfg * Babel config options, which still hasn't mature pyproject.toml support
@@ -45,7 +45,7 @@ To install {{ cookiecutter.project }}: | |||
|
|||
git clone https://github.com/{{ cookiecutter.github_user_name }}/{{ cookiecutter.project }}.git | |||
cd {{ cookiecutter.project }} | |||
pip install -e . | |||
pip install . |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This causes some confusion because the source remains in the directory where you cloned it, but the actual modules are installed in the virtual env libraries dir. Which means that users might try to make changes in the cloned files and be confused when these are not applied (it certainly happened to me a couple of times). Maybe I'm biased and a regular users won't tinker with the sources that much but if we really don't want to use editable installs by default perhaps we should a clear note here about the development install option mentioned a bit below.
See #8456 (comment) Hopefully we will address the requirements handling and can just recommend `pip install ckanext-xxx` soon
@wardi I've reverted the install command back to editable as discussed in the dev meeting, this is ready for review |
/backport please |
/backport |
Backport failed for Please cherry-pick the changes locally and resolve any conflicts. git fetch origin dev-v2.11
git worktree add -d .worktree/backport-8456-to-dev-v2.11 origin/dev-v2.11
cd .worktree/backport-8456-to-dev-v2.11
git switch --create backport-8456-to-dev-v2.11
git cherry-pick -x 665c235dfe411b64c71978d4ae5a4b1816f8979e f7342c7926c7e67d83e590b77b3132a00a8c7937 77f6bbedf51cbc7c7a9a2511d64ae42705cb02e4 88672de2c76a436c296852b24f4ee2172f754031 cbaf04853424268ec19793a04cc0508648a40f2c 880351582df9808b039902f7dac2866c7d674d72 2a2f63c4066edab38e7ce872bad3940073963cc3 cc8744ff79931e1e8077a38ecfd8112254cb0bd5 85f8cd8bab9244a74428690c0fb3a297ea65ac49 d1a54f5aed7dbbf36d85fde53f871d9bf5f5bc24 |
See #8456 (comment) Hopefully we will address the requirements handling and can just recommend `pip install ckanext-xxx` soon
Consolidate all setuptools config in setup.cfg as per discussion in ckan/ckan#8456
Refers to #8382 (this also includes #8437)
As discussed in #8382, this PR:
python setup.py develop
andpython setup.py sdist upload
commands, and to not recommend editable installs unless it's a development installsetup.cfg
[build-system]
section to CKAN core's pyproject.tomlThere are no changes with relation to namespace packages or requirements in this PR