Skip to content

Commit

Permalink
modifying uranium script
Browse files Browse the repository at this point in the history
  • Loading branch information
toumorokoshi committed Feb 1, 2015
1 parent 4e8f312 commit 4c2fbcd
Show file tree
Hide file tree
Showing 5 changed files with 33 additions and 41 deletions.
43 changes: 7 additions & 36 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,43 +6,14 @@ Uranium: a build system for python, in python.
uranium is a build system that allows for compilation of python-based
services and tools. It can handle situations such as:

## Funcitonality to support
* downloading and installing eggs in a sandbox (virtualenv)
* compiling and installing native libraries
* any other arbitrary build steps through plugins

### compiling native dependencies
You can find out more here:

this can be performed as a pre-build step. there should be functionality to:
* add to arbitrary environment variables (e.g. LD_LIBRARY_PATH)
http://uranium.readthedocs.org/en/latest/

### support platforms
## Getting started:

version platforms must be supported. Maybe a version inheritance
hierarchy can be supported via plugins

### support plugins

you can extend functionality through plugins. Plugins should be able to modify
absolutely anything within uranium, to allow for more complex and custom behaviours.

## The schema

Uranium's main file is a uranium.yaml configuration file. It looks like this:

phases:
pre-build: zeromq
index: http://pypi.python.org
develop-eggs:
- .
eggs:
- zmq >= 0.1
parts:
zeromq:


# TODO

* does develop-eggs to a bad egg directory raise an error?
* it should just warn
* support buildout plugins
* support buildout extensions?
* support inheritance
* make virtualenv relocatable at the end of the build process
http://uranium.readthedocs.org/en/latest/tutorial.html
10 changes: 10 additions & 0 deletions docs/tutorial.rst
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,17 @@ Now you need a uranium.yaml file. Let's make one now:

This is all you need to run uranium. Let's run them now:

.. code-block:: yaml
$ ./uranium
installing virtualenv...
...
activating virtualenv...
...
installing uranium...
...
running uranium...
...
And congrats, you've had your first Uranium run! Of course, all this
did was run virtualend and install Uranium. Now let's get some real
Expand Down
9 changes: 9 additions & 0 deletions notes.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,3 +27,12 @@ Uranium needs to work in a variety of situations, so testing is key. Ultimately
Distutils contains the code that helps package and download dependencies. If this is not copied over, it can
lead to the distutils on the system path being loaded, which results in an incorrect configuration, which finally
can cause eggs to be installed incorrectly (due to a misdetected root path)

# TODO

* does develop-eggs to a bad egg directory raise an error?
* it should just warn
* support buildout plugins
* support buildout extensions?
* support inheritance
* make virtualenv relocatable at the end of the build process
10 changes: 6 additions & 4 deletions scripts/uranium
Original file line number Diff line number Diff line change
Expand Up @@ -49,27 +49,29 @@ def main(argv):
install_dir = os.path.join(current_dir, URANIUM_TARGET)
uranium_dir = options.uranium_dir

LOGGER.info("installing virtualenv...")
_install_virtualenv(install_dir)

LOGGER.info("activating virtualenv...")
LOGGER.debug("activating virtualenv...")
_activate_virtualenv(install_dir)

os.chdir(current_dir)

if options.with_uranium:
LOGGER.info("installing uranium...")
LOGGER.info("setting up uranium...")
_install_uranium(install_dir, uranium_dir=uranium_dir,
version=options.version)
LOGGER.info("done!")

LOGGER.info("running uranium...")
LOGGER.debug("running uranium...")
_run_uranium(install_dir)


def _install_virtualenv(install_dir):
if _is_virtualenv(install_dir):
return

LOGGER.info("installing virtualenv...")

temp_dir = tempfile.mkdtemp()
try:
_download_virtualenv(temp_dir)
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
]

setup(name='uranium',
version='0.0.45',
version='0.0.46',
description='a build system for python',
long_description='a build system for python',
author='Yusuke Tsutsumi',
Expand Down

0 comments on commit 4c2fbcd

Please sign in to comment.