How do I create a Python egg that will properly pick up all the files and directories in a Python package :?:

I have tried to do this with a "setup.py" file (created outside the Python package). Listed below are its contents:

from setuptools import setup, find_packages

    setup(name = "XWF Meta Data",
    version = "1.0",
    description = "Unknown",
    author = "Nobody",
    author_email = "nobody@none.com",
    classifiers = ["Development Status :: Alpha/Unstable", "Framework :: Zope 3"],
    packages = find_packages("XWFMetadata"),
    package_dir = {"root": "XWFMetadata"},
    include_package_data = True,
    zip_safe = False
    )

The "XWFMetadata" directory is the Python package. It only contains python files. When I enter in "sudo python setup.py install" only the egg info is created and copied over into the Python "site-packages" directory (exists as "XWF_Meta_Data-1.0-py2.5.egg" directory).

Recommended Answers

All 4 Replies

Did you read this documentation http://peak.telecommunity.com/DevCenter/EggFormats ? It seems that you need an EGG-INFO directory. I don't create python eggs, so I can't help you much, but I think reading this is the starting point. If you manage creating your egg, please post the key tricks here :)

Wait so python doesn't automatically get the things you download for it? I'd need to type in some import code to get it to work?

You have to install it if your wondering. But on linux its different. Repositries and such.

Did you read this documentation http://peak.telecommunity.com/DevCenter/EggFormats ? It seems that you need an EGG-INFO directory. I don't create python eggs, so I can't help you much, but I think reading this is the starting point. If you manage creating your egg, please post the key tricks here :)

The documentation you have referred to is only for people who are contributing to setuptools (it includes a warning at the beginning). An EGG-INFO directory is already created and installed to the site-packages directory (in Python install directory), by the setup.py script using the following command:

python setup.py install

What is missing is an actual directory (or something else) that contains the Python package that I have created.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.