[opensuse-packaging] What's the easiest way to find python script dependencies?
Hi, is there a python tool to find dependencies of a python script in a package? Thanks Dave P -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-packaging+owner@opensuse.org
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
-- python programming - mail server - photo - video - https://sebix.at cryptographic key at https://sebix.at/DC9B463B.asc and on public keyservers
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
On 09/01/2017 10:55, Sebastian wrote: python script and tell me what functions it depends on to run. Thanks Dave P -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-packaging+owner@opensuse.org
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 -- python programming - mail server - photo - video - https://sebix.at cryptographic key at https://sebix.at/DC9B463B.asc and on public keyservers
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 -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-packaging+owner@opensuse.org
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 -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-packaging+owner@opensuse.org
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/ -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-packaging+owner@opensuse.org
participants (4)
-
Dave Plater
-
Jan Engelhardt
-
Sebastian
-
Thomas Bechtold