NbPythonHgBuild
Building NetBeans IDE source for Python Development
-- Parent project wiki:http://wiki.netbeans.org/Python
--Initial version created: Amit Kumar Saha -- minor extensions : Jean-Yves Mengant
Generic guide to work with NetBeans sources is here
Here are the steps that you would need to follow to build *only* the Python bits from the NetBeans sources.
- Clone the
main
repository: {hg clone http://hg.netbeans.org/main pythonbits} - After the clone is over, go to the
'pythonbits/nbbuild'
and create the file {user.build.properties} with the following recommended entries:
cluster.config=python permit.jdk6.builds=true build.compiler=extJavac javac.compilerargs=-J-Xmx512m nbjdk.home=/home/amit/jdk1.6.0_10/
Line 1 tells 'ant' to build only the Python cluster Line 2 allows building with JDK 1.6 Line 3,4,5 points to the Sun 'javac' compiler details
You may also need to build python + other clusters as well => update the cluster.config stanza providing the requested clusters :
nb.clusters.list=nb.cluster.nb,nb.cluster.platform,nb.cluster.ide,nb.cluster.python,nb.cluster.java,nb.cluster.websvccommon
- Now execute
'ant'
from the {nbbuild/} directory - The build process starts and after it is over, navigate to
nbbuild/netbeans/bin
directory to fire up the NetBeans executable
if at some stages you need to debug resulting netbeans executable you should add the following line to your user.build.properties :
build.compiler.debug=true
and follow the 'Debugging NetBeans with the NetBeans debugger' guide as a starting point for debugging the nbpython environment.
Working with mercurial
Mercurial is the version manager used by Netbeans and the Python Netbeans module. To roughly summarize, Mercurial is a 'better and reacher CVS' , the starting point to use it is the Netbeans Mercurial How-to
When working daily (or nightly !) in the Netbeans python code you may be faced with urgent simple fixes ready to commit mixed with more complex changes that you want keep locally until they reach a stable state meanwhile other developer have pushed modifications ready to be merged. This tricky situation may happen often and you'll be stucked scratching your head with the infamous :
% hg merge abort: outstanding uncommitted changes
Tor Norbye provides a very good tip on his weblog here that can save your life then ... well at least it may save your work ;=)
Troubleshooting
If the code fails to build, it is possible that the codeline is in a bad state - perhaps somebody is in the middle of committing changes. If you are building the whole IDE, check that NetBeans itself is currently building by checking the continuous NetBeans builds at http://deadlock.netbeans.org/hudson/job/trunk/. Second, check that the Python support itself is buildable at http://deadlock.netbeans.org/hudson/job/python/.
Filing Bugs
File bugs in the Python category: http://www.netbeans.org/issues/enter_bug.cgi?component=python&issue_type=DEFECT
