[Python-Dev] Bilingual scripts

Tres Seaver tseaver at palladion.com
Tue May 28 18:17:49 CEST 2013


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 05/28/2013 11:41 AM, R. David Murray wrote:
> I have the same complaint about setuptools entry-point scripts, where 
> I still haven't figured out how to go from what is in the file to the 
> code that actually gets called.

Hmm, just dump the 'entry_points.txt' file in the named distribution's
EGG-INFO directory?  E.g.:

 $ cat bin/pip
 #!/path/to/virtualenv/bin/pythonX.Y
 # EASY-INSTALL-ENTRY-SCRIPT: 'pip==1.3.1','console_scripts','pip'
 __requires__ = 'pip==1.3.1'
 import sys
 from pkg_resources import load_entry_point

 if __name__ == '__main__':
     sys.exit(
         load_entry_point('pip==1.3.1', 'console_scripts', 'pip')()
     )

 $ cat
lib/pythonX.Y/site-packages/pip-1.3.1-pyX.Y.egg/EGG-INFO/entry_points.txt
 [console_scripts]
 pip = pip:main
 pip-X.Y = pip:main



Tres.
- -- 
===================================================================
Tres Seaver          +1 540-429-0999          tseaver at palladion.com
Palladion Software   "Excellence by Design"    http://palladion.com
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with undefined - http://www.enigmail.net/

iEYEARECAAYFAlGk2K0ACgkQ+gerLs4ltQ6WaACZAbdz7k3sdM21DNx0mzcecY93
hvYAoJTwA2l3OvSoYStzGmsJ+N16JDwM
=YHcy
-----END PGP SIGNATURE-----



More information about the Python-Dev mailing list