What's the easiest way to find python script dependencies?

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

What's the easiest way to find python script dependencies?

Dave Plater lst
Hi, is there a python tool to find dependencies of a python script in a
package?

Thanks

Dave P

--
To unsubscribe, e-mail: [hidden email]
To contact the owner, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: What's the easiest way to find python script dependencies?

Sebastian-2
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



signature.asc (871 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: What's the easiest way to find python script dependencies?

Dave Plater lst


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
--
To unsubscribe, e-mail: [hidden email]
To contact the owner, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: What's the easiest way to find python script dependencies?

Sebastian-2
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-information-from-a-setup-py

Sebastian

--
python programming - mail server - photo - video - https://sebix.at
cryptographic key at https://sebix.at/DC9B463B.asc and on public keyservers



signature.asc (871 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: What's the easiest way to find python script dependencies?

Jan Engelhardt-4
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: [hidden email]
To contact the owner, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: What's the easiest way to find python script dependencies?

Dave Plater lst
In reply to this post by Sebastian-2


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-information-from-a-setup-py
>
> 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: [hidden email]
To contact the owner, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: What's the easiest way to find python script dependencies?

Thomas Bechtold
In reply to this post by Dave Plater lst
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: [hidden email]
To contact the owner, e-mail: [hidden email]