Hi,

I dislike python-config for multiple reasons

You may get the wrong information if you pick the wrong python-config script :-(

IMHO we should add a new module (problem: how should it be called?
pyconfig?) which could be used using "python3 -m xxx ...". There is a
similar discussion between "pip ..." and "python3 -m pip ..."
commands: I understand that "python3 -m pip ..." is more reliable to
know which Python will be picked, especially in a virtual environment.

There are two implementations: one in Python used on macOS, one in
shell used on other platforms.

Moreover, if it's implemented in the stdlib, it can be implemented in
Python and it should be easier to maintain than a shell script. For
example, python-config has no unit test...

Victor

Le mer. 8 janv. 2020 à 17:00, Musbur <mus...@posteo.org> a écrit :
>
> Hello,
>
> I'm experimenting with package development on different versions of
> Python in different virtualenvs. After running "make" I don't do "make
> install", but rather I set up virtualenvs by running
> /path/to/source/python -m venv env_dir. This works for as long as I
> don't need to compile extensions. Once I do that I'm running into
> trouble because there is no python3-config binary in the venv, so it
> uses the "system" python3-config which of course returns results for the
> /usr(/local)/.... tree.
>
> This seems to go against the idea of an encapsulated and self-contained
> environment. And the venv created straight from the "not-installed"
> source tree works so well that having a venv/bin/python3-config whose
> output points into the source tree seems a logical step. Is this an
> omission or is there a rationale for not doing it?
>
> Of course I can "properly" install different Python versions by using
> different "configure --prefix" directories. But I like the venv so much
> in general that this rubs me the wrong way.
>
> Thanks!
> _______________________________________________
> Python-Dev mailing list -- python-dev@python.org
> To unsubscribe send an email to python-dev-le...@python.org
> https://mail.python.org/mailman3/lists/python-dev.python.org/
> Message archived at 
> https://mail.python.org/archives/list/python-dev@python.org/message/KMG3USMQLQNI6AEX6UUS2WTNFIIIS2XY/
> Code of Conduct: http://python.org/psf/codeofconduct/



-- 
Night gathers, and now my watch begins. It shall not end until my death.
_______________________________________________
Python-Dev mailing list -- python-dev@python.org
To unsubscribe send an email to python-dev-le...@python.org
https://mail.python.org/mailman3/lists/python-dev.python.org/
Message archived at 
https://mail.python.org/archives/list/python-dev@python.org/message/NTNC4ZXNR6XFJPX5HK6VEFCZYEPP47IV/
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to