From Fedora Project Wiki

(moved Devshell development to Devshell API: gonna create another devshell getting started with development page)
 
No edit summary
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
#REDIRECT [[Devshell API]]
= Virtual Environment =
 
[[Devshell]] uses Python's setuptools utility for managing development, testing, and deployment. It includes a handy development mode that will include the development directory in the path, and give the developer direct access to the source code. In order to do this without affecting the system wide settings, we will need to install a virtual environment using <code>python-virtualenv</code>. To set up your environment, do the following:
 
<pre>
$ sudo yum install python-dateutil python-configobj python-virtualenv, rpm-python
$ virtualenv ~/devshell
</pre>
 
Ordinarily, you should use --no-site-packages when working with virtualenv, however, Devshell has a dependency on <code>rpm-python</code> which does not operate as a Python Egg. This means we have to rely on system provided modules for development.
 
== Activating the Environment ==
 
<pre>
$ source ~/devshell/bin/activate
</pre>
 
== Deactivating the Environment ==
 
If you need to reuse the terminal window and can't just close it, run the following command to exit the Virtual Environment mode.
 
<pre>
$ deactivate
</pre>
 
= Fetching Source =
 
Once we are in the virtual enviroment, we need to get the source code from Fedora Hosted via Git.
 
<pre>
$ git clone git://git.fedorahosted.org/fedora-devshell.git
$ cd fedora-devshell
</pre>
 
This shouldn't take long.
 
= Setting up the development environment =
 
Setting up a development environment with setuptools is easy. Run the following command after retrieving the fresh source code.
 
<pre>
fedora-devshell/ $ python setup.py development
</pre>
 
Then you are ready to begin working. The commands <code>ports</code> and <code>devshell</code> should be available in your path now.
 
If you add new python files, modules, or make changes to <code>setup.py</code> or <code>MANIFEST.in</code> you will need to run that command again. You do not need to run it just to make changes to prexisting files.
 
If you're looking to know where to go to next, have a look at the [[Devshell API | API Documentation]]
 
= Submitting Patches =
 
Do it.
 
= Creating Modules =
 
Fill in something here on how to create modules that go in seperate packages. It will involve entrypoints and other fun things.

Latest revision as of 06:08, 30 April 2009

Virtual Environment

Devshell uses Python's setuptools utility for managing development, testing, and deployment. It includes a handy development mode that will include the development directory in the path, and give the developer direct access to the source code. In order to do this without affecting the system wide settings, we will need to install a virtual environment using python-virtualenv. To set up your environment, do the following:

$ sudo yum install python-dateutil python-configobj python-virtualenv, rpm-python
$ virtualenv ~/devshell

Ordinarily, you should use --no-site-packages when working with virtualenv, however, Devshell has a dependency on rpm-python which does not operate as a Python Egg. This means we have to rely on system provided modules for development.

Activating the Environment

$ source ~/devshell/bin/activate

Deactivating the Environment

If you need to reuse the terminal window and can't just close it, run the following command to exit the Virtual Environment mode.

$ deactivate

Fetching Source

Once we are in the virtual enviroment, we need to get the source code from Fedora Hosted via Git.

$ git clone git://git.fedorahosted.org/fedora-devshell.git
$ cd fedora-devshell

This shouldn't take long.

Setting up the development environment

Setting up a development environment with setuptools is easy. Run the following command after retrieving the fresh source code.

fedora-devshell/ $ python setup.py development

Then you are ready to begin working. The commands ports and devshell should be available in your path now.

If you add new python files, modules, or make changes to setup.py or MANIFEST.in you will need to run that command again. You do not need to run it just to make changes to prexisting files.

If you're looking to know where to go to next, have a look at the API Documentation

Submitting Patches

Do it.

Creating Modules

Fill in something here on how to create modules that go in seperate packages. It will involve entrypoints and other fun things.