Over a million developers have joined DZone.

Hatching Python Eggs from NetBeans IDE

DZone's Guide to

Hatching Python Eggs from NetBeans IDE

· Web Dev Zone
Free Resource

Learn how to build modern digital experience apps with Crafter CMS. Download this eBook now. Brought to you in partnership with Crafter Software

Support for building Python eggs  ( IZ #150283) from NetBeans IDE is now available in the repository. (Refer this link to see how you can clone the repository and build the Python bits). Please try it and file bugs and suggestions here.

Now, I would like to talk a bit of Python Eggs and how to use the NetBeans IDE to build Eggs for your Python packages.

A Python Egg is to Python as JAR is to Java or a 'gem' is to Ruby. It comprises of your code, resources and all important metadata- version, dependency information, etc. All the gory details are here at http://peak.telecommunity.com/DevCenter/PythonEggs.

How to lay Python eggs in NetBeans IDE:

  1. Right-click on the Python project name and select 'Build Egg':

  2. If you already have a setup.py file (Please refer the 'assumptions' section below) , and a do a 'Build Egg' it uses that. (Do a 'Clean & Build Egg' to create a default setup.py file. If you don't have a setup.py, one is created for you.

  3. The process can be tracked in the Output window:
  4. Once the build process is over, you will see the the 'egg' has been deposited in the 'dist' directory (accessible in the Files window):

It is not viewable from the Projects window as it unnecessarily clutters the view.

Egg Formats

As you can see from the above view, there is also a file, EggDemo.egg-info, which is another format for Python Eggs as mentioned in http://peak.telecommunity.com/DevCenter/EggFormats

The wiki page has some more information.


These have to assumed, because that is the way it has to be:

  1. You have setuptools installed
  2. Your setup.py file lives in the top level directory- src or your existing sources' root directory
  3. Your packages or sub-packages (those containing __init.py__) are actually in the sub-(sub)-directories under your top-level directory, in which setup.py lives

Crafter is a modern CMS platform for building modern websites and content-rich digital experiences. Download this eBook now. Brought to you in partnership with Crafter Software.


Opinions expressed by DZone contributors are their own.


Dev Resources & Solutions Straight to Your Inbox

Thanks for subscribing!

Awesome! Check your inbox to verify your email so you can start receiving the latest in tech news and resources.


{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}