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:
- Right-click on the Python project name and select 'Build Egg':
- 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.
- The process can be tracked in the Output window:
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.
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:
- You have setuptools installed
- Your setup.py file lives in the top level directory- src or your existing sources' root directory
- 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