Questions tagged [egg]

A python egg is a file used for distributing python projects as bundles; it is usually compressed with the zip algorithm. Egg files normally include some metadata; the file extension is ".egg". The concept is very similar to a Java .jar file.

An egg is a bundle that contains all the package data. In the ideal case, an egg is a zip-compressed file with all the necessary package files. But in some cases, Python's setuptools decides (or is told via CLI switches) that a package should not be zip-compressed. In those cases, an egg is simply an uncompressed subdirectory, but with the same contents. The single file version is useful for transporting, and saves a little bit of disk space, but an egg directory is functionally and organizationally identical. The concept is very similar to a Java .jar file.

You may use an egg simply by pointing your shell environment's PYTHONPATH or Python's sys.path at it and importing as you normally would, for Python versions >= 2.5. If you wish to take this approach, you do not need to bother with setuptools or ez_setup.py at all.

338 questions
0
votes
0 answers

How to check if a python module is a egg

I am working on a module that may or may not be loaded from an egg file, and for each case, there should be a different action (setting up of the module). What is the best way to detect if the current module was loaded from an egg file or directly…
romaia
  • 403
  • 3
  • 6
0
votes
1 answer

buildout cfg requires modules that are already installed

I am trying to run: sudo bin/buildout And I get a message saying: mr.developer: Queued 'django-accessibillity' for checkout. mr.developer: Queued 'django-registration' for checkout. mr.developer: Queued 'ivc-formutils' for checkout. And asks me…
Marijus
  • 3,696
  • 11
  • 44
  • 85
0
votes
1 answer

Debian 7 + django + gunicorn + virtualenv : site-packages egg-link not in pythonpath

Context : Debian 7 gunicorn (installed from debian package in order to use /etc/gunicorn.d configuration) Project dependencies installed via pip in a virtualenv Dependencies are installed using pip install -r requirements.txt In this file we have…
fabien-michel
  • 1,235
  • 12
  • 30
0
votes
1 answer

How to find the containing egg file from Python class?

From Python 2.6 it is possible to run an egg file directly from python command line, by incorporating a main.py file. Now... is it possible to detect in runtime if the current executing python code is running directly from an egg and obtain the path…
user2123288
  • 923
  • 1
  • 11
  • 17
0
votes
2 answers

I cannot find setup.py in my OSX babel installation to import the cldr babel files, what am I doing wrong?

I have been trying to use babel on my iMac (OSX Mavericks, I installed python and babel using MacPorts) but I get this error message : [...] writing PO template file to ./locale/messages.pot Traceback (most recent call last): File…
Ailete619
  • 134
  • 1
  • 13
0
votes
1 answer

Install python egg without launching buildout

I have installed my Django app with buildout and now I would like to add one more eggs. But if I just add the egg in my buildout, and launch buildout, it will update all my eggs, which I don't want as I'm not sure it will work well with upgraded…
user2016483
  • 573
  • 1
  • 5
  • 12
0
votes
2 answers

Self-contained egg installs: turbogears and pythonpath

I have a TG 1.0 application (not 1.1 -- I'm not sure I can convince the admin to upgrade) running. I have my own checkout of the project from cvs that I'm developing with, and it's come time to integrate xlwt (http://www.python-excel.org/) into the…
sastraxi
  • 1,304
  • 11
  • 21
0
votes
0 answers

Python: nice way to access all metadata data in PGK-INFO?

I want to include an MD5 hash of my source code whenever I install my module. To do this I put the hash at the end of the description field for setuptools.setup: import subprocess cmd="/sbin/md5 mymodule/*.py | md5 " p=subprocess.Popen(cmd,…
nick maxwell
  • 1,371
  • 2
  • 13
  • 22
0
votes
1 answer

Python: How do i get the name of the current archive?

Is there any way to get the current archive name in Python? Something like EggArchive.egg Lib ---SomePythonFile.py From SomePython.py, is there anyway to fetch the .egg name?
Nida Sahar
  • 628
  • 3
  • 12
  • 29
0
votes
1 answer

Create a Python binary using compile all

I have figured two ways to create a package / compile python scripts: Using Compileall: import re compileall.compile_dir('Lib/', rx=re.compile(r'[/\\][.]svn'), force=True) Using SetupTools Though SetupTools creates a .egg file, it creates a…
Nida Sahar
  • 628
  • 3
  • 12
  • 29
0
votes
1 answer

Eclipse doesn't import dropbox egg

Hello and excuse me for my English. I have problems with importing dropbox.egg in my django project, I am using Eclipse as IDE on Windows 7. I installed dropbox.egg with easy_install on my c:\Python27. In System libraries of my project I've the…
blackat
  • 13
  • 1
  • 5
0
votes
1 answer

Faking an egg in buildout from a github repository

I want to try this middleware in a Django project I'm working on: https://github.com/directeur/django-pdf. It goes by the name "django-pdf", but is not the same as https://pypi.python.org/pypi/django-pdf/1.0.2. Unfortunately, the Directeur…
kojiro
  • 67,745
  • 16
  • 115
  • 177
0
votes
1 answer

python building egg but nothing happens

I'm trying to build an egg with my app, but it doesn't work. I have easy_installed on my machine. In the folder with app I created file setup.py with this content: from setuptools import setup Then I run: $ python setup.py bdist_egg but nothing…
pisarzp
  • 587
  • 2
  • 7
  • 12
0
votes
1 answer

pylab troubles with EPD version of ipython

I recently switched to the EPD version of ipython (I have the 64-bit student edition), and now I'm having trouble with pylab. When I type "import pylab" it gives me the following error ImportError Traceback (most recent…
arwright3
  • 321
  • 2
  • 3
  • 11
0
votes
2 answers

custom django management command not working when deployed as egg

I've made a little django app, only one management command, which is packaged into an egg. If I unzip the egg into a blank django project, add it to installed_apps, the management command works. However, when it is easy_installed onto a server and…
0atman
  • 3,034
  • 3
  • 26
  • 40
1 2 3
22
23