zc.buildout recipe that creates an Eclipse PyDev Project config with PYTHONPATH pointing to some eggs and their dependencies
Project description
Detailed Documentation
Motivation
PyDev is a Python IDE for Eclipse.
Among many useful things it highlights syntax errors, allows code completion and code navigation. For these to fully work, it is necessary to configure the project’s external dependencies appropriately.
This recipe
PyDev adds a new PyDev Project to Eclipse.
This zc.buildout recipe generates the two files that define a PyDev Project:
.project and .pydevproject.
Apart from simple project configuration, the recipe adds the eggs of your choice as external dependencies. Their transitive dependencies are added as well.
Benefits
Usually the PyDev Project files .project and .pydevproject are not good candidates for versioning. The reason is that these can easily contain user specific information, like personal directory paths. This recipe allows you to version, in a buildout file, the information necessary to generate these files.
Configuring the PyDev Project external dependencies by hand is neither clear not easy.
Users of Maven and Eclipse JDT might find this project build generation very familiar. (Don’t use Java? I thought every Eclipse user did.)
Usage
Add your recipe configuration to buildout.cfg and include it in ${buildout:parts}. An example:
[buildout] ... parts = ... pydevproject [pydevproject] recipe = collective.recipe.pydevproject name = my_project_name src = src python_version = python 2.7 python_interpreter = Default eggs = any_egg_you_want
Options
These match the options of a PyDev Project.
- name
The project name. This is just for Eclipse and can be anything you want.
- src
The source folder, relative to the root of the project. Usually src. (TODO: get this from ${buildout:develop} and setup.py)
- python_version
The combination of interpreter and grammar version. E.g. python 2.7
- python_interpreter
The interpreter name, as configured in the the Eclipse Preferences for PyDev. Usually Default is fine.
Remember to register at least one interpreter in Eclipse before using your project. That can be done in Window > Preferences > PyDev > Interpreter - Python > New....
- eggs
The eggs that will be listed as external dependencies. You don’t need to include transitive dependencies. This is done automatically.
Source
Source code lives at http://github.com/collective/collective.recipe.pydevproject.
Change history
0.1 (2012-12-01)
Initial implementation. [marciomazza]
Contributors
Marcio Mazza [marciomazza]
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
File details
Details for the file collective.recipe.pydevproject-0.1.zip
.
File metadata
- Download URL: collective.recipe.pydevproject-0.1.zip
- Upload date:
- Size: 11.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6cba8624738af0cb26d075d7c37fdf93baa2bfa598ec6c05d53b1ed12fd34074 |
|
MD5 | b9a5054aac88a37dff7e4c01450ff456 |
|
BLAKE2b-256 | b5e59ea7290dc6075cdaa3292defda10df5ab4f2756149b495e84bed235d6d77 |