-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
Be more opinionated for setting up a dev env. #15961
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
you will have to rerun this command every time the source is changed. | ||
Additionally you will need to copy :file:`setup.cfg.template` to | ||
:file:`setup.cfg` and edit it to contain :: | ||
|
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.
So is this not needed anymore?
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.
Not if you always use an editable 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.
Are pip and setuptools now smart enough to handle changes to extension code in editable mode? My sense is that editable mode works great for changes to existing python modules, but not beyond that.
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.
C files are mentioned above and still have the note "rebuild if you edit one of them".
I think that ignoring the conda alternative in this context is a mistake, and will lead to more confusion, not less. |
You can use venvs within a conda env (in fact this is my normal everyday setup on my work machine...). |
Agree with @efiring here. I don't think I've used a venv since before conda was a thing & I'd be majorly frustrated/confused with making a venv in my conda env |
For a conda user the disadvantage of venv is that it is yet another arcane and peripheral thing to have to learn and keep straight. What is the advantage of using one within a conda env rather than just using another conda env? |
I'm not dead set against it, someone just needs to write the instructions on how to set them up and activate them. (Note that there were no instructions for either before...) |
Will do. May take a day or two to really test that the described setup works. You can move this forward without conda or wait. Both is fine with me. |
@h-vetinari mpl practice is to usually milestone against the next release & if it isn't release critical than it gets remilestoned before the release is cut. |
The instructions use the |
When following the new instructions on current master, I'm getting
when running |
switching to py3 seems fine, done. |
Is it really true, that calling |
This is explicitly allowed by https://www.python.org/dev/peps/pep-0394/#for-python-runtime-distributors. |
Well, there is the Debian policy https://www.debian.org/doc/packaging-manuals/python-policy/ch-python.html#s-base:
Perhaps, at some point in the future, |
@anntzer in that case, please go through the whole file and replace all occurrences of |
Once you're in the env you can use python (the env will provide that unsuffixed name for you); the suffixed name is only necessary to set up the env. |
Another issue: |
Tell users to always use a venv and always install in editable mode. If they know better, great. But let's not offer too many confusing options to newcomers.
ah yes, that can be fixed with the usual dance of |
Nice. More: |
You're supposed to run pip install -ve . at least once, and setup.py build_ext -i only on later runs. |
I didn't catch that from the new docs. Perhaps wording should be something like
|
It's in the paragraph immediately above the edit? (you may want to expand the unmodified part of the file in the diff view) |
You're right, I had missed that when looking at the diff. 👍 |
Next: When running pytest, I'm getting lots of file-not-found errors like
The directory contains
|
Can you please provide a full log of what you did, starting from setting up a clean venv? |
|
Strange, can't repro locally. What's |
$ inkscape --version
Inkscape 1.0beta1 (fe3e306978, 2019-09-17) The weird thing is that the directory contains all kinds of files,
but not Well, the issue seems unrelated to this PR and I don't want to delay it. Filed and issue report at #15999. |
Ah yes, I think inkscape 1.0 changed their command line interface and we'll probably need to fix some stuff on mpl's side to support that, can you downgrade to inkscape<1.0 for now? |
Okay, I downgraded and got the test to pass now (after #16002). LGTM. |
Even without conda, this is an improvement. Conda-based configuration can follow in a separate PR. |
Owee, I'm MrMeeseeks, Look at me. There seem to be a conflict, please backport manually. Here are approximate instructions:
And apply the correct labels and milestones. Congratulation you did some good work ! Hopefully your backport PR will be tested by the continuous integration and merged soon! If these instruction are inaccurate, feel free to suggest an improvement. |
Giving up on backporting, because the local freetype change #15476 won‘t be in 3.2. |
Tell users to always use a venv and always install in editable mode.
If they know better, great. But let's not offer too many confusing
options to newcomers.
xref https://discourse.matplotlib.org/t/running-tests-on-git-master/20761/
PR Summary
PR Checklist