Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I create Python eggs from distutils source packages?

I vaguely remember some sort of setuptools wrapper that would generate .egg files from distutils source. Can someone jog my memory?

like image 691
Ben Avatar asked Mar 30 '12 21:03

Ben


2 Answers

setuptools monkey-patches some parts of distutils when it is imported. When you use easy_install to get a distutils-based project from PyPI, it will create an egg (pip may do that too). To do the same thing locally (i.e. in a directory that’s a code checkout or an unpacked tarball), use this trick: python -c "import setuptools; execfile('setup.py')" bdist_egg.

like image 129
merwok Avatar answered Oct 03 '22 09:10

merwok


Have you tried

python setup.py bdist_egg

Here I assume you are using setuptools instead of distutils i.e.

in setup.py instead of

from distutils.core import setup

use

from setuptools import setup
like image 41
Anurag Uniyal Avatar answered Oct 03 '22 11:10

Anurag Uniyal