egg

Build a wheel/egg and all dependencies for a python project

Build a wheel/egg and all dependencies for a python project Question: In order to stage python project within our corporation I need to make an installable distribution. This should include: An egg or whl for my project An egg or whl for every dependency of the project (optionally) produce a requirements.txt file listing all the …

Total answers: 3

Importing Python libraries and gracefully handling if they are not availalble

Importing Python libraries and gracefully handling if they are not availalble Question: I would like to import bunch of libraries and catch the exception. If I have only 1 try catch block I get 1 exception (the first one). Is there a pattern to iterate over all of the libs and have a separate exception …

Total answers: 3

What is the difference between an 'sdist' .tar.gz distribution and an python egg?

What is the difference between an 'sdist' .tar.gz distribution and an python egg? Question: I am a bit confused. There seem to be two different kind of Python packages, source distributions (setup.py sdist) and egg distributions (setup.py bdist_egg). Both seem to be just archives with the same data, the python source files. One difference is …

Total answers: 2

Most Pythonic way to provide global configuration variables in config.py?

Most Pythonic way to provide global configuration variables in config.py? Question: In my endless quest in over-complicating simple stuff, I am researching the most ‘Pythonic’ way to provide global configuration variables inside the typical ‘config.py‘ found in Python egg packages. The traditional way (aah, good ol’ #define!) is as follows: MYSQL_PORT = 3306 MYSQL_DATABASE = …

Total answers: 8

How do I manage third-party Python libraries with Google App Engine? (virtualenv? pip?)

How do I manage third-party Python libraries with Google App Engine? (virtualenv? pip?) Question: What’s the best strategy for managing third-party Python libraries with Google App Engine? Say I want to use Flask, a webapp framework. A blog entry says to do this, which doesn’t seem right: $ cd /tmp/ $ wget http://pypi.python.org/packages/source/F/Flask/Flask-0.6.1.tar.gz $ tar …

Total answers: 7

How do I uninstall a Python module (“egg”) that I installed with easy_install?

How do I uninstall a Python module (“egg”) that I installed with easy_install? Question: I’ve installed a couple of Python modules using easy_install. How do I uninstall them? I couldn’t see an uninstall option listed in easy_install –help. Asked By: Paul D. Waite || Source Answers: Ah, here we go: $ easy_install -m PackageName $ …

Total answers: 2

Is there a python equivalent of Ruby's 'rvm'?

Is there a python equivalent of Ruby's 'rvm'? Question: Q: Do we have anything functionally equivalent in Python to the Ruby version manager ‘rvm’? (RVM lets you easily switch completely between different versions of the ruby interpreter and different sets of gems (modules). Everything concerning download-build-install-switch of interpreter(-s) and gems gets taken care of by …

Total answers: 6

Python: Why do some packages get installed as eggs and some as "egg folders"?

Python: Why do some packages get installed as eggs and some as "egg folders"? Question: I maintain a few Python packages. I have a very similar setup.py file for each of them. However, when doing setup.py install, one of my packages gets installed as an egg, while the others get installed as “egg folders”, i.e. …

Total answers: 2

What is a Python egg?

What is a Python egg? Question: I’m trying to understand how Python packages work. Presumably eggs are some sort of packaging mechanism, but what would be a quick overview of what role they play and may be some information on why they’re useful and how to create them? Asked By: Bialecki || Source Answers: Note: …

Total answers: 4