-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
Support for custom commands and functions #265
Comments
Just wanted to create this issue myself! (adding some keywords I was searching for here: post-install hook, post-install script). We can't write the code in |
I don't plan on supporting this. The whole idea of Poetry and |
I was just researching Poetry as one of possibilities for our new workflow and I bumped into this issue. Up until now, we've been using good old
If Poetry doesn't plan to support these custom build steps, we could:
I really like Poetry and I thought it could be a solution to our current problems. But without these custom build steps, I'm afraid we won't be able to use it. @sdispater, do you think that there is any way around this? Any chance we could add a hook that would run before each call of |
In case anyone comes here because of Still, their automatic compilation is not possible. Maybe the plug-in system will solve this, follow #1237 |
* ci(integration): Add 3.10 release * ci(tests): Support python 3.10 final, still keep master experimental build * ci(tox): Add python 3.10 * chore: Use string to prevent coercing 3.10 to 3.1 * ci(integration): Remove experimental We will add this back to 3.11 alpha or when bootstrap-args is supported by the tox.ini for setting poetry to master/trunk.
Not being able to run custom commands is one of the blockers for us to switch to poetry. There's now a plugin system implemented: #3733 – Probably one needs to implement a plugin to have that feature? |
Ditto, I think that this is a reason why I will not use poetry. |
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Hello,
When using
setup.py
, it is possible to customize commands or use functions to get some results dynamically.For instance, to run a post install script (that requires dependencies to be installed) one can write this:
and use this class as keyword argument value in the
setup()
call:(other commands like clean, test, tox can be customized this way too).
Second example, in order to compile translation files (po files) into mo files at setup time:
and use the result as keyword argument value in the
setup()
call:data_files=create_mo_files()
It looks quite obvious that it's not possible to do such things if one uses only a
pyproject.toml
file: how would it import a class or a function, or know about it, how to run it? (Or is there a way?)From reading the code, I've seen that the keyword arguments list passed to
setup()
is hard coded (to build a sdist), socmdclass
anddata_files
are not usable at the moment (if I'm not wrong).I guess this is not the easiest feature to implement. Is it planned or already discussed?
The text was updated successfully, but these errors were encountered: