|
| 1 | +import os |
| 2 | +import sys |
| 3 | +from os.path import join, pardir, abspath, dirname, split |
| 4 | + |
| 5 | +from paver.easy import * |
| 6 | +from paver.setuputils import setup |
| 7 | + |
| 8 | +from setuptools import find_packages |
| 9 | + |
| 10 | +VERSION = (0, 1, 4) |
| 11 | +__version__ = VERSION |
| 12 | +__versionstr__ = '.'.join(map(str, VERSION)) |
| 13 | + |
| 14 | +setup( |
| 15 | + name = 'djangomarkup', |
| 16 | + version = __versionstr__, |
| 17 | + description = 'Support for various markup languages in Django applications', |
| 18 | + long_description = '\n'.join(( |
| 19 | + '(TODO)', |
| 20 | + )), |
| 21 | + author = 'centrum holdings s.r.o', |
| 22 | + license = 'BSD', |
| 23 | + |
| 24 | + packages = find_packages( |
| 25 | + where = '.', |
| 26 | + exclude = ('docs', 'tests') |
| 27 | + ), |
| 28 | + |
| 29 | + include_package_data = True, |
| 30 | +) |
| 31 | + |
| 32 | + |
| 33 | +options( |
| 34 | + citools = Bunch( |
| 35 | + rootdir = abspath(dirname(__file__)) |
| 36 | + ), |
| 37 | +) |
| 38 | + |
| 39 | +try: |
| 40 | + from citools.pavement import * |
| 41 | +except ImportError: |
| 42 | + pass |
| 43 | + |
| 44 | +@task |
| 45 | +def install_dependencies(): |
| 46 | + sh('pip install -r requirements.txt') |
| 47 | + |
| 48 | +@task |
| 49 | +def bootstrap(): |
| 50 | + options.virtualenv = {'packages_to_install' : ['pip']} |
| 51 | + call_task('paver.virtual.bootstrap') |
| 52 | + sh("python bootstrap.py") |
| 53 | + path('bootstrap.py').remove() |
| 54 | + |
| 55 | + |
| 56 | + print '*'*80 |
| 57 | + if sys.platform in ('win32', 'winnt'): |
| 58 | + print "* Before running other commands, You now *must* run %s" % os.path.join("bin", "activate.bat") |
| 59 | + else: |
| 60 | + print "* Before running other commands, You now *must* run source %s" % os.path.join("bin", "activate") |
| 61 | + print '*'*80 |
| 62 | + |
| 63 | +@task |
| 64 | +@needs('install_dependencies') |
| 65 | +def prepare(): |
| 66 | + """ Prepare complete environment """ |
0 commit comments