Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 1092291
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T23:39:37+00:00 2026-05-16T23:39:37+00:00

When I run python setup.py sdist it creates an sdist in my ./dist directory.

  • 0

When I run

  python setup.py sdist

it creates an sdist in my ./dist directory. This includes a “PROJECT-egg.info” file in the zip inside my “dist” folder, which I don’t use, but it doesn’t hurt me, so I just ignore it.

My question is why does it also create a “PROJECT-egg.info” folder in my project root directory? Can I make it stop creating this? If not, can I just delete it immediately after creating the sdist?

I’m using the ‘setup’ function imported from setuptools.
WindowsXP, Python2.7, Setuptools 0.6c11, Distribute 0.6.14.

My setup config looks like:

{'author': 'Jonathan Hartley',
 'author_email': 'tartley@tartley.com',
 'classifiers': ['Development Status :: 1 - Planning',
                 'Intended Audience :: Developers',
                 'License :: OSI Approved :: BSD License',
                 'Operating System :: Microsoft :: Windows',
                 'Programming Language :: Python :: 2.7'],
 'console': [{'script': 'demo.py'}],
 'data_files': [('Microsoft.VC90.CRT',
                 ['..\\lib\\Microsoft.VC90.CRT\\Microsoft.VC90.CRT.manifest',
                  '..\\lib\\Microsoft.VC90.CRT\\msvcr90.dll'])],
 'description': 'Utilities for games and OpenGL graphics, built around Pyglet.\n',
 'keywords': '',
 'license': 'BSD',
 'long_description': "blah blah blah",
 'name': 'pygpen',
 'options': {'py2exe': {'ascii': True,
                        'bundle_files': 1,
                        'dist_dir': 'dist/pygpen-0.1-windows',
                        'dll_excludes': [],
                        'excludes': ['_imaging_gif',
                                     '_scproxy',
                                     'clr',
                                     'dummy.Process',
                                     'email',
                                     'email.base64mime',
                                     'email.utils',
                                     'email.Utils',
                                     'ICCProfile',
                                     'Image',
                                     'IronPythonConsole',
                                     'modes.editingmodes',
                                     'startup',
                                     'System',
                                     'System.Windows.Forms.Clipboard',
                                     '_hashlib',
                                     '_imaging',
                                     '_multiprocessing',
                                     '_ssl',
                                     '_socket',
                                     'bz2',
                                     'pyexpat',
                                     'pyreadline',
                                     'select',
                                     'win32api',
                                     'win32pipe',
                                     'calendar',
                                     'cookielib',
                                     'difflib',
                                     'doctest',
                                     'locale',
                                     'optparse',
                                     'pdb',
                                     'pickle',
                                     'pyglet.window.xlib',
                                     'pyglet.window.carbon',
                                     'pyglet.window.carbon.constants',
                                     'pyglet.window.carbon.types',
                                     'subprocess',
                                     'tarfile',
                                     'threading',
                                     'unittest',
                                     'urllib',
                                     'urllib2',
                                     'win32con',
                                     'zipfile'],
                        'optimize': 2}},
 'packages': ['pygpen'],
 'scripts': ['demo.py'],
 'url': 'http://code.google.com/p/edpath/',
 'version': '0.1',
 'zipfile': None}
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-16T23:39:37+00:00Added an answer on May 16, 2026 at 11:39 pm

    This directory is created intentionally as part of the build process for a source distribution. A little gander at the developer guide for setuptools gives you a hint as to why:

    But, be sure to ignore any part of the
    distutils documentation that deals
    with MANIFEST or how it’s generated
    from MANIFEST.in; setuptools shields
    you from these issues and doesn’t work
    the same way in any case. Unlike the
    distutils, setuptools regenerates the
    source distribution manifest file
    every time you build a source
    distribution, and it builds it inside
    the project’s .egg-info directory, out
    of the way of your main project
    directory. You therefore need not
    worry about whether it is up-to-date
    or not.

    You may safely delete the directory after your build has completed.

    Bonus edit:

    I customize the clean command within my setup.py on many of my Python projects to delete *.egg-info, dist, build, and *.pyc and other files. Here’s an example of how it’s done in setup.py:

    import os
    from setuptools import setup, Command
    
    class CleanCommand(Command):
        """Custom clean command to tidy up the project root."""
        user_options = []
        def initialize_options(self):
            pass
        def finalize_options(self):
            pass
        def run(self):
            os.system('rm -vrf ./build ./dist ./*.pyc ./*.tgz ./*.egg-info')
    
    # Further down when you call setup()
    setup(
        # ... Other setup options
        cmdclass={
            'clean': CleanCommand,
        }
    )
    

    To illustrate, after running python setup.py build on a dummy project called “poop” (Yes, I’m very mature), this happens:

    $ python setup.py build
    running build
    running build_py
    creating build
    creating build/lib
    creating build/lib/poop
    copying poop/__init__.py -> build/lib/poop
    

    And now if we run python setup.py clean:

    $ python setup.py clean
    running clean
    removed `./build/lib/poop/__init__.py'
    removed directory: `./build/lib/poop'
    removed directory: `./build/lib'
    removed directory: `./build'
    

    Tada!

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm writing a setup.py file for a Python project so that I can distribute
I run sudo python setup.py install to install the Mongrel2 Python support, but it
I'm trying to run SnakeFood , to analyze a python project. I'm on a
So I've got a directory that looks something like this: home\ setup.py some_python_file.py ext\
When i install software(XYZ) using setup.py file using command python setup.py install it copy
When I run python setup.py test the dependencies listed in tests_require in setup.py are
When I'm in my virtual environment, I attempt to run: pip install MySQL-python This
I want to set up a cron job to run a python script, but
Is it possible for TextMate to run Python scripts in IDLE instead of internally
Is there any free and open-source option to run python from an usb-stick on

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.