Hi, is there a python tool to find dependencies of a python script in a package?
Thanks
Dave P
Hi,
The setup.py lists the hard-dependencies. Often there are requirements.txt files listing optional requirements and/or recommended versions.
You may also have a look at the tool py2pack: https://github.com/openSUSE/py2pack/#usage
Sebastian
On 01/09/2017 09:46 AM, Dave Plater wrote:
Hi, is there a python tool to find dependencies of a python script in a package?
Thanks
Dave P
On 09/01/2017 10:55, Sebastian wrote:
Hi,
The setup.py lists the hard-dependencies. Often there are requirements.txt files listing optional requirements and/or recommended versions.
You may also have a look at the tool py2pack: https://github.com/openSUSE/py2pack/#usage
Sebastian
On 01/09/2017 09:46 AM, Dave Plater wrote:
Hi, is there a python tool to find dependencies of a python script in a package?
Thanks
Dave P
Those are heavy weight tools, I just need something to parse a simple python script and tell me what functions it depends on to run. Thanks Dave P
Hi,
On 01/09/2017 10:33 AM, Dave Plater wrote:
Those are heavy weight tools,
I'm not sure how a simple file could be heavy weight tool.
You could just look how other tools, e.g. the already mentioned py2pack, are doing it: https://github.com/openSUSE/py2pack/blob/master/py2pack/requires.py And you are not the first asking this question: https://stackoverflow.com/questions/24236266/how-to-extract-dependencies-inf...
Sebastian
On Monday 2017-01-09 10:51, Sebastian wrote:
Hi,
On 01/09/2017 10:33 AM, Dave Plater wrote:
Those are heavy weight tools,
I'm not sure how a simple file could be heavy weight tool.
The heavyness lies in the python runtime :p
On 09/01/2017 11:51, Sebastian wrote:
Hi,
On 01/09/2017 10:33 AM, Dave Plater wrote:
Those are heavy weight tools,
I'm not sure how a simple file could be heavy weight tool.
You could just look how other tools, e.g. the already mentioned py2pack, are doing it: https://github.com/openSUSE/py2pack/blob/master/py2pack/requires.py And you are not the first asking this question: https://stackoverflow.com/questions/24236266/how-to-extract-dependencies-inf...
Sebastian
I've posted another thread which maybe better explains what I'm looking for. I will certainly test drive setup.py next time I create a python package. The script I refer to builds the html documentation for FlightGear and then gets deleted. Thanks Dave P
On Mon, 2017-01-09 at 10:46 +0200, Dave Plater wrote:
Hi, is there a python tool to find dependencies of a python script in a package?
There is metaextract [1][2]. It "only" needs python and setuptools. Maybe that helps?
Best
Tom
[1] https://pypi.python.org/pypi/metaextract [2] https://toabctl.wordpress.com/2016/08/29/extracting-dependencies-fr om-python-sdist-archives/