eandersson / amqpstorm

Thread-safe Python RabbitMQ Client & Management library
https://www.amqpstorm.io/
MIT License
186 stars 36 forks source link

pip sdist circular dependancy #88

Closed jhogg closed 3 years ago

jhogg commented 3 years ago

I ran into a circular dependency with pip doing a source install into a docker container (clean install).

pip operates in 3 stages: collect, build wheels (if not already a wheel), and then install.

pip downloads pamqp (requirements.txt) & amqpstorm (from our github repo - source) pip attempts to convert the sdist into a wheel. In the process of running setup.py, it imports amqpstorm to get version for the build. The init.py pulls in the other modules, which try to import pamqp - which isn't installed yet.

Not a critical issue, just an odd circular dependency that newer versions of pip have caused.

eandersson commented 3 years ago

Interesting. Do you have any suggestion on how to fix it. I guess an alternative would be to just parse init.py as a text file, instead of importing it as a python module?

eandersson commented 3 years ago

I found a pretty simple implementation from the official guidelines. Should do the job. https://packaging.python.org/guides/single-sourcing-package-version/