Tool for managing remote repositories from your git CLI!
Project description
Buildstrap: generate a buildout config for any *env project
------------------------------------------------------------
.. figure:: http://www.wtfpl.net/wp-content/uploads/2012/12/wtfpl-badge-2.png
:alt: WTFPL
WTFPL
There's pyenv, pyvenv, venv, virtualenv… and who knows how many other
ways to deal with development of python programs in a per-project
self-contained manner.
While most of the python community tried to keep up, and got their shell
configuration or global pip changing regularly, some have been quietly
enjoying python development the same way for the last ten years, using
`buildout <https://github.com/buildout/buildout/>`__ for their
development.
Though, it's a fact that buildout is not the standard way to do things,
even if it's a very convenient tool. So to keep your repositories
compatible with most \*env tools available — or get buildout with other
projects. I wrote this tool to make it easy to create a buildout
environment within the project.
Usage
~~~~~
when you got a repository that has requirements files, at the root of
your project's directory, call buildstrap using:
::
% buildstrap run project requirements.txt
where ``project`` as second argument is the name of the package as
you've set it up in your ``setup.py`` — and as you'd import it from
other python code.
Running that command will generate the ``buildout.cfg`` file, and run
``buildout`` in your current directory. Then you'll find all your
scripts available in the newly created ``bin`` directory of your
project.
If you have several ``requirements.txt`` files, depending on the task
you want to do, it's easy:
::
% buildstrap run project project=requirements.txt test=requirements-test.txt doc=requirements-doc.txt
which will create three sections in your ``buildout.cfg`` file, and get
all the appropriate dependencies.
Here's a real life example:
::
% git hub clone kennethreitz/requests
% cd requests
% buildstrap run requests requirements.txt
…
% bin/py.test
… (look at the tests result)
% bin/python3
>>> import requests
>>>
or another one:
::
% git hub clone jkbrzt/httpie
% cd httpie
% buildstrap run httpie requirements-dev.txt
…
% bin/py.test
… (look at the tests result)
% bin/http --version
1.0.0-dev
Installation
~~~~~~~~~~~~
it's as easy as any other python program:
::
% pip install buildstrap
or from the sources:
::
% git hub clone guyzmo/buildstrap
% cd buildstrap
% python3 setup.py install
Development
~~~~~~~~~~~
for development you just need to do:
::
% pip install buildstrap
% git hub clone guyzmo/buildstrap
% builstrap run buildstrap requirements.txt
…
% bin/buildstrap
Yeah, I'm being evil here
Todo list:
- [ ] Tests
- [ ] Pydoc
License
~~~~~~~
::
Copyright © 2016 Bernard `Guyzmo` Pratz <guyzmo+buildstrap+pub@m0g.net>
This work is free. You can redistribute it and/or modify it under the
terms of the Do What The Fuck You Want To Public License, Version 2,
as published by Sam Hocevar. See the LICENSE file for more details.
------------------------------------------------------------
.. figure:: http://www.wtfpl.net/wp-content/uploads/2012/12/wtfpl-badge-2.png
:alt: WTFPL
WTFPL
There's pyenv, pyvenv, venv, virtualenv… and who knows how many other
ways to deal with development of python programs in a per-project
self-contained manner.
While most of the python community tried to keep up, and got their shell
configuration or global pip changing regularly, some have been quietly
enjoying python development the same way for the last ten years, using
`buildout <https://github.com/buildout/buildout/>`__ for their
development.
Though, it's a fact that buildout is not the standard way to do things,
even if it's a very convenient tool. So to keep your repositories
compatible with most \*env tools available — or get buildout with other
projects. I wrote this tool to make it easy to create a buildout
environment within the project.
Usage
~~~~~
when you got a repository that has requirements files, at the root of
your project's directory, call buildstrap using:
::
% buildstrap run project requirements.txt
where ``project`` as second argument is the name of the package as
you've set it up in your ``setup.py`` — and as you'd import it from
other python code.
Running that command will generate the ``buildout.cfg`` file, and run
``buildout`` in your current directory. Then you'll find all your
scripts available in the newly created ``bin`` directory of your
project.
If you have several ``requirements.txt`` files, depending on the task
you want to do, it's easy:
::
% buildstrap run project project=requirements.txt test=requirements-test.txt doc=requirements-doc.txt
which will create three sections in your ``buildout.cfg`` file, and get
all the appropriate dependencies.
Here's a real life example:
::
% git hub clone kennethreitz/requests
% cd requests
% buildstrap run requests requirements.txt
…
% bin/py.test
… (look at the tests result)
% bin/python3
>>> import requests
>>>
or another one:
::
% git hub clone jkbrzt/httpie
% cd httpie
% buildstrap run httpie requirements-dev.txt
…
% bin/py.test
… (look at the tests result)
% bin/http --version
1.0.0-dev
Installation
~~~~~~~~~~~~
it's as easy as any other python program:
::
% pip install buildstrap
or from the sources:
::
% git hub clone guyzmo/buildstrap
% cd buildstrap
% python3 setup.py install
Development
~~~~~~~~~~~
for development you just need to do:
::
% pip install buildstrap
% git hub clone guyzmo/buildstrap
% builstrap run buildstrap requirements.txt
…
% bin/buildstrap
Yeah, I'm being evil here
Todo list:
- [ ] Tests
- [ ] Pydoc
License
~~~~~~~
::
Copyright © 2016 Bernard `Guyzmo` Pratz <guyzmo+buildstrap+pub@m0g.net>
This work is free. You can redistribute it and/or modify it under the
terms of the Do What The Fuck You Want To Public License, Version 2,
as published by Sam Hocevar. See the LICENSE file for more details.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
buildstrap-0.1.0.tar.gz
(4.5 kB
view hashes)
Built Distribution
Close
Hashes for buildstrap-0.1.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3b6480d60b44e0a351197b675676fdb4b1b07850fdc6809cba7cb33933d69732 |
|
MD5 | 333babf7318a3a83831482b9d1aa9090 |
|
BLAKE2b-256 | 3454b9e66b18f00f4acb47544f83d9b2c170d8bff4baf63beb93f88f3a6ed514 |