On Sat, Oct 15, 2016 at 4:38 PM, Ben Finney wrote:
> Thomas Kluyver writes:
>
>> If the entry point looks like:
>>
>> foo=foomod:main
>>
>> Then you can invoke it in a subprocess by running:
>>
>> subprocess.Popen([sys.executable, '-c', 'import foomod; foomod.main()'])
>
> That will invoke the pr
On 16 October 2016 at 00:38, Ben Finney wrote:
>> This avoids the need to work out where the 'foo' script has been
>> installed to.
>
> So, I'm still wanting to know from Setuptools itself at run time, what
> filesystem path Setuptools installed the command to.
Setuptools doesn't install the comm
It does not store that information, except maybe in the manifest used for
uninstall in the .*-info directory for your installed distribution.
On Sat, Oct 15, 2016, 19:39 Ben Finney wrote:
> Thomas Kluyver writes:
>
> > If the entry point looks like:
> >
> > foo=foomod:main
> >
> > Then you can
Thomas Kluyver writes:
> If the entry point looks like:
>
> foo=foomod:main
>
> Then you can invoke it in a subprocess by running:
>
> subprocess.Popen([sys.executable, '-c', 'import foomod; foomod.main()'])
That will invoke the program. I'll probably try that.
One disadvantage there is the pro
On Sat, Oct 15, 2016, at 06:57 PM, Ben Finney wrote:
> I'm modifying an existing application that invokes the program as a
> subprocess, so I'm wanting to find that program as an external command.
If the entry point looks like:
foo=foomod:main
Then you can invoke it in a subprocess by running:
Nick Timkovich writes:
> 1. include the shell scripts (could also be binaries) in the package &
> manifest
> (https://github.com/nicktimko/autolycus/blob/master/MANIFEST.in#L3)
No, I'm using ‘[…] install --install-scripts=APPLICATION_SCRIPTS_PATH’
at install time.
> 2. use pkg_resources to get
The entry points aren't needed at all in that case, but I made a shim (that
legacy.py) anyways to have access to the packaged shell script for testing.
On Sat, Oct 15, 2016 at 1:05 PM, Nick Timkovich
wrote:
> I recently was trying to port a mix of shell & Python scripts to pure
> Python (https:/
I recently was trying to port a mix of shell & Python scripts to pure
Python (https://github.com/nicktimko/autolycus), and my interim solution to
get something working to test was to:
1. include the shell scripts (could also be binaries) in the package &
manifest (https://github.com/nicktimko/auto
Nick Timkovich writes:
> Usually that entry point is on the PATH […]
It's not, because I'm deliberately specifying that it shouldn't be, at
install time. This is an executable that is private to the application
and not for general availability on the host.
> If you want to call that entry point
Usually that entry point is on the PATH, so it should be somewhere in
os.environ['PATH'], so if you just `subprocess.run(['myentrything'])` that
would fire it.
If you want to call that entry point from your code, the clean way (same
environment/version, and especially if you don't need to bother
m
Howdy,
How can a Python application discover at run-time where on the
filesystem its own ‘entry_points’ programs are available?
The Setuptools ‘entry_points’ are available at run-time to the
distribution, via the ‘pkg_resources’ API for entry points
https://setuptools.readthedocs.io/en/latest/pkg
11 matches
Mail list logo