Конфликт пространства имен Python между источником локали и установленным модулемPython

Программы на Python
Гость
Конфликт пространства имен Python между источником локали и установленным модулем

Сообщение Гость »


I have a suite of python library using the same namespace (following PEP 420 and https://packaging.python.org/en/latest/ ... e-packages) in multiple git repositories. I am using poetry to manage dependencies and build the wheels that are uploaded to a private python package repository.

I added the library subpackage_a as dependency of subpackage_b. subpackage_a is now installed in mysubpackage_b poetry virtual environment, used to develop and run tests of this last.

Python is prioritizing the import from the site-packages so I'm able to import the dependency mynamespace.subpackage_a but not the locale module mynamespace.subpackage_b anymore.

Of course, if I build and install subpackage_b, it can import both, but I'm looking for a way to make it work from the source code so I can have a decent development experience.

I tried to explicit the path where my source are located in the PYTHONPATH. The pyproject.toml contains:
[tool.poetry] name = "mynamespace-subpackage-a" version = "1.0.0" description = "" authors = ["author"] packages = [ {include = "mynamespace"} ]

Источник: https://stackoverflow.com/questions/781 ... led-module

Вернуться в «Python»