egg

How Do I Create a Python / Django Egg?

I have a Python program (with Django - does this matter?) that I want to 'bundle', if you like. How do I do this, in the same way one can create a .jar for Java? ...

force unpacking of certain egg directories

I have an egg distribution of a PyQt application which i build myself, and it contains sphinx generated documentation. When i call the help file from the application it opens the sphinx index.html in a QtWebKit.QWebView window. Apparently, only the index.html file is extracted from the egg into the OS's egg-directory (e.g. [..]\Applicati...

Python importing modules differently when run interactively/non-interactively

One of my Python scripts runs in interactive mode but fails when run from the command line. The difference is that when run from the command line, it imports modules from a bad .egg file, and when run interactively it uses my fixed (unzipped) version in the current directory. My question is two-fold: a) why does Python load modules diff...

Self-contained egg installs: turbogears and pythonpath

Hi there! 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 web app. However, I don't have administrator access and it's not easy to get ...

How to unzip python eggs?

Hi, I'm trying to bundle some egg dependencies when using py2exe and as stated on the py2exe site, it doesn't work with those and I need to unzip them first. I've tried to first run easy_install -m lxml and then easy_install --always-unzip lxml==2.2.2, but it didn't work. Then I tried to set the unzipping behaviour to default by putting ...

How to create Python egg file

I have questions about egg files in Python. I have much Python code organized by package and I'm trying to create egg files. I'm following instructions, but they are very common. According to that, it seems I need to have a setup.py file. Would you please tell me what I need to put into setup.py file and where it should reside? I sup...

What is a Python egg?

Doing a quick search of SO, I didn't find anything, but feel free to just redirect me. Basically, I'm new to Python and just trying to understand how it's packages work. Presumably "eggs" are some sort of packaging mechanism, but if someone could give me a quick overview of what role they play and maybe some information on why they're ...

python egg development environment setup

hi, I inherited a python project, which has been packaged as egg. Upon check out through SVN, I am seeing package content as: __init__.py scripts/ ptools/ setup.py ... Here, ptools/ hold the source of various modules. scripts/ is bunch of end-user tools that make use of modules provided by the "ptools". The package has been installed...

egg git interface for emacs, commit message empty

I'm using egg (emacs got git) as git interface in emacs. Whenever I try to achieve a commit --amend, I receive a "GIT-COMMIT-AMEND> Aborting commit due to empty commit message". This is what i do: C-u C-x v c Then the commit buffer appears, with the message of my previous commit. Then upon C-c C-c I get the message stated above: emp...

Why does easy_install extract some python eggs and not others?

Looking in my /usr/local/lib/python.../dist-package directory, I have .egg directories and .egg files. Why does the installer choose to extra packages to the .egg directory, yet leave other files with .egg extensions? ...

Importing BitTorrent bencode module

Hi, I'm on Mac OS X 10.6. Python is 2.6.1. I've installed bencode module as sudo easy_install BitTorrent-bencode It appeared in site-packages /Library/Python/2.6/site-packages/BitTorrent_bencode-5.0.8-py2.6.egg But, how to import and use this module? >>> import bencode doesn't work... Traceback (most recent call last): ...

Python Finding all packages inside a package, even when in an egg

Given a Python package, how can I automatically find all its sub-packages? I used to have a function that would just browse the file system, looking for folders that have an __init__.py* file in them, but now I need a method that would work even if the whole package is in an egg. ...

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

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. folders with an extension of "egg". I couldn't figure out what is the difference between them that causes this di...

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

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 invoking rvm...

python: simple example for a python egg with a one-file source file?

I'm not quite sure how to build a really simple one-file source module. Is there a sample module out there one the web somewhere which can be built as a python .egg? From the setuptools page it looks pretty simple, you just have your setup.py file and then at least one other .py file somewhere, and I can build an .egg file OK, and even ...

Why is sys.path showing non-existent items (which cause import problems)?

I'm seeing some additional items in sys.path which 1) don't exist and 2) cause problems with imports (specifically with Nose). Basically, I've created a package (lets call it foo) which I use in multiple projects. The project I'm working on at the moment can import everything from foo without issue, but when I run Nose I get import erro...

What are simple instructions for creating a Python package structure and egg?

I just completed my first (minor) Python project, and my boss wants me to package it nicely so that it can be distributed and called from other programs easily. He suggested I look into eggs. I've been googling and reading, but I'm just getting confused. Most of the sites I'm looking at explain how to use Python eggs that were already cr...

I created a Python egg; now what?

I've finally figured out how to create a Python egg and gotten it to work. Now... what do I do with it? How do I use it? How do I ensure that everything was correctly included? (Simple steps please... not just redirection to another site. I've googled, but it's confusing me, and I was hoping someone could explain it in a couple of simple...

Override DEFINEs in setup.cfg in source eggs

The source egg of PySQLite 2.6.0 contains a file setup.cfg that looks like this: [build_ext] #define= #include_dirs=/usr/local/include #library_dirs=/usr/local/lib libraries=sqlite3 define=SQLITE_OMIT_LOAD_EXTENSION I'd like to build the egg with the SQLITE_OMIT_LOAD_EXTENSION define disabled (not set). I could do that by uncommenting...

Building lxml for Python 27

Hi Guys, I am trying to build lxml for Python 27 on windows 64 bit machine. I couldn't find lxml egg for Python27 version. So I am compiling it from sources. I am following instructions on this site http://codespeak.net/lxml/build.html under static linking section. I am getting error C:\Documents and Settings\Administrator\Desktop\l...