Requirements management tool.
Project description
Pundle
=======
Pundle is bunder-like replacement of virtualenv for developers and works great with pyenv.
It is not recommended to use Pundle for deployment (it was created for different purpose)
and currently only works with PyPI packages. Git, SVN and other package sources will be added later.
For now works only with PyPI packages.
Git, svn and others support planned.
Prerequisites
-------------
- I recommend using pyenv
- requires setuptools
- requires pip
Commands
--------
`pundle [install]` will install files from frozen.txt file and reveal
new requirements if something is not frozen yet.
`pundle upgrade` will recreate frozen.txt from requirements.txt.
`pundle fixate` installs site customization for current python.
`pundle exec cmd [args]` executes entry point from one of the installed packages.
`pundle entry_points` prints entry points from all packages.
`pundle edit [package]` returns path to package directory.
How to play with it
-------------------
Simple with usercustomize.py:
git clone git@github.com:Deepwalker/pundler.git
python pundler/pundle.py fixate
cd testproject
python -m pundle upgrade
Pundle will create directory `~/.pundledir` and file `frozen.txt`.
Or you can make ``alias pundle='python /full/path/to/pundle/pundle.py'`` and use it.
And add ``/full/path/to/pundle`` to your ``PYTHONPATH``.
But you will need to manual load dependencies in your project start script, like this:
import pundle
parser_kw = pundle.create_parser_parameters()
suite = pundle.Parser(**parser_kw).create_suite()
if suite.need_freeze():
raise Exception('%s file is outdated' % suite.parser.frozen_file)
if suite.need_install():
raise Exception('Some dependencies not installed')
suite.activate_all()
DONE
----
- install according to frozen.txt
- on update rewrite frozen.txt
- on launch check if frozen.txt is in touch with requirements.txt
- search through hierarchy upward
- tie packages to python version.
- package scripts
- upgrade must lookup PyPI for new version
- in install mode if requirement is not frozen, then install latest package from PyPI. Else install frozen version.
in 'upgrade package' - upgrade selected package and dependencies, if needed.
in 'upgrade' - upgrade all packages.
TODO
----
- ! write source of requirement (requirements.txt or other package) to frozen.txt then we can check unneeded requirements without installed packages
- ! add vcs support
- add environments support, aka development, testing.
Maybe generate frozen.txt only for pip and use more rich structure for itself?
And put only production packages to frozen.txt, and track all, development and others in frozen.toml?
- ? tie packages only where we need this (C extensions, py2 without __pycache__ support)
- ? bundle distlib (now using one from pip)
- ? bundle pkg_resources (now using one from setuptools)
=======
Pundle is bunder-like replacement of virtualenv for developers and works great with pyenv.
It is not recommended to use Pundle for deployment (it was created for different purpose)
and currently only works with PyPI packages. Git, SVN and other package sources will be added later.
For now works only with PyPI packages.
Git, svn and others support planned.
Prerequisites
-------------
- I recommend using pyenv
- requires setuptools
- requires pip
Commands
--------
`pundle [install]` will install files from frozen.txt file and reveal
new requirements if something is not frozen yet.
`pundle upgrade` will recreate frozen.txt from requirements.txt.
`pundle fixate` installs site customization for current python.
`pundle exec cmd [args]` executes entry point from one of the installed packages.
`pundle entry_points` prints entry points from all packages.
`pundle edit [package]` returns path to package directory.
How to play with it
-------------------
Simple with usercustomize.py:
git clone git@github.com:Deepwalker/pundler.git
python pundler/pundle.py fixate
cd testproject
python -m pundle upgrade
Pundle will create directory `~/.pundledir` and file `frozen.txt`.
Or you can make ``alias pundle='python /full/path/to/pundle/pundle.py'`` and use it.
And add ``/full/path/to/pundle`` to your ``PYTHONPATH``.
But you will need to manual load dependencies in your project start script, like this:
import pundle
parser_kw = pundle.create_parser_parameters()
suite = pundle.Parser(**parser_kw).create_suite()
if suite.need_freeze():
raise Exception('%s file is outdated' % suite.parser.frozen_file)
if suite.need_install():
raise Exception('Some dependencies not installed')
suite.activate_all()
DONE
----
- install according to frozen.txt
- on update rewrite frozen.txt
- on launch check if frozen.txt is in touch with requirements.txt
- search through hierarchy upward
- tie packages to python version.
- package scripts
- upgrade must lookup PyPI for new version
- in install mode if requirement is not frozen, then install latest package from PyPI. Else install frozen version.
in 'upgrade package' - upgrade selected package and dependencies, if needed.
in 'upgrade' - upgrade all packages.
TODO
----
- ! write source of requirement (requirements.txt or other package) to frozen.txt then we can check unneeded requirements without installed packages
- ! add vcs support
- add environments support, aka development, testing.
Maybe generate frozen.txt only for pip and use more rich structure for itself?
And put only production packages to frozen.txt, and track all, development and others in frozen.toml?
- ? tie packages only where we need this (C extensions, py2 without __pycache__ support)
- ? bundle distlib (now using one from pip)
- ? bundle pkg_resources (now using one from setuptools)
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
pundle-0.1.1.tar.gz
(6.6 kB
view hashes)