Skip to content

Commit

Permalink
Merge pull request #549 from AspenWeb/stop-vendoring
Browse files Browse the repository at this point in the history
Stop vendoring dependencies
  • Loading branch information
pjz committed Mar 10, 2016
2 parents 14667ad + 944a203 commit 5407264
Show file tree
Hide file tree
Showing 18 changed files with 14 additions and 2,403 deletions.
31 changes: 10 additions & 21 deletions build.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@

# Core Executables
# ================
# We satisfy dependencies using local tarballs, to ensure that we can build
# without a network connection. They're kept in our repo in ./vendor.

ASPEN_DEPS = [
'python-mimeparse>=0.1.4',
Expand All @@ -26,14 +24,9 @@
'pytest-cov>=1.6',
]

INSTALL_DIR = './vendor/install'
TEST_DIR = './vendor/test'
BOOTSTRAP_DIR = './vendor/bootstrap'

ENV_ARGS = [
'./vendor/virtualenv-13.0.3.py',
'-m', 'virtualenv',
'--prompt=[aspen]',
'--extra-search-dir=' + BOOTSTRAP_DIR,
]


Expand Down Expand Up @@ -85,20 +78,15 @@ def _deps(envdir='env'):
if b"found" in v:
return envdir
for dep in ASPEN_DEPS:
run(_virt('pip', envdir), 'install', '--no-index',
'--find-links=' + INSTALL_DIR, dep)
run(_virt('pip', envdir), 'install', dep)
run(_virt('python', envdir), 'setup.py', 'develop')
return envdir


def _dev_deps(envdir='env'):
envdir = _deps(envdir)
# pytest will need argparse if it's running under 2.6
if _virt_version(envdir) < (2, 7):
TEST_DEPS.insert(0, 'argparse')
for dep in TEST_DEPS:
run(_virt('pip', envdir), 'install', '--no-index',
'--find-links=' + TEST_DIR, dep)
run(_virt('pip', envdir), 'install', dep)
return envdir

def dev():
Expand Down Expand Up @@ -231,7 +219,7 @@ def clean_build():

def _jython_home():
if not os.path.exists('jython_home'):
local_jython = os.path.join('vendor', 'jython-installer.jar')
local_jython = 'jython-installer.jar'
run('wget', JYTHON_URL, '-qO', local_jython)
run('java', '-jar', local_jython, '-s', '-d', 'jython_home')

Expand All @@ -245,13 +233,13 @@ def _jenv():
def clean_jenv():
"""clean up the jython environment"""
shell('find', '.', '-name', '*.class', '-delete')
shell('rm', '-rf', 'jenv', 'vendor/jython-installer.jar', 'jython_home')
shell('rm', '-rf', 'jenv', 'jython_home')

def jython_test():
"""install jython and run tests with coverage (requires java)"""
_jenv()
for dep in TEST_DEPS:
run(_virt('pip', 'jenv'), 'install', os.path.join('vendor', dep))
run(_virt('pip', 'jenv'), 'install', dep)
run(_virt('jython', 'jenv'), 'setup.py', 'develop')
run(_virt('jython', 'jenv'), _virt('py.test', 'jenv'),
'--junitxml=jython-testresults.xml', 'tests',
Expand Down Expand Up @@ -297,6 +285,7 @@ def show_targets():
NON_TARGETS = [ 'main', 'autoclean', 'run', 'shell' ]
NON_TARGETS += list(x for x in LOCALS if x.startswith('_') or not callable(LOCALS[x] ))

main( default='show_targets'
, ignoreprefix="python" # workaround for gh190
)
if __name__ == '__main__':
main( default='show_targets'
, ignoreprefix="python" # workaround for gh190
)
3 changes: 0 additions & 3 deletions requirements.txt

This file was deleted.

16 changes: 4 additions & 12 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@

from setuptools import find_packages, setup

from build import ASPEN_DEPS, TEST_DEPS

version = open('version.txt').read()


Expand All @@ -15,7 +17,6 @@
, 'License :: OSI Approved :: MIT License'
, 'Natural Language :: English'
, 'Operating System :: OS Independent'
, 'Programming Language :: Python :: 2.6'
, 'Programming Language :: Python :: 2.7'
, 'Programming Language :: Python :: Implementation :: CPython'
, 'Topic :: Internet :: WWW/HTTP :: WSGI :: Application'
Expand All @@ -34,16 +35,7 @@
, version = version
, zip_safe = False
, package_data = {'aspen': ['www/*', 'configuration/mime.types']}
, install_requires = [ 'python-mimeparse==0.1.4'
, 'first==2.0.1'
, 'algorithm>=1.0.0'
, 'filesystem_tree>=1.0.0'
]
, install_requires = ASPEN_DEPS
, extras_require = {'fcgi': ['flup']}
, tests_require = [ 'virtualenv>=1.11'
, 'py'
, 'coverage'
, 'pytest'
, 'pytest-cov'
]
, tests_require = TEST_DEPS
)
Binary file removed vendor/bootstrap/pip-7.0.3-py2.py3-none-any.whl
Binary file not shown.
Binary file not shown.
Binary file removed vendor/bootstrap/wheel-0.24.0-py2.py3-none-any.whl
Binary file not shown.
Binary file removed vendor/install/algorithm-1.0.0.tar.gz
Binary file not shown.
Binary file removed vendor/install/dependency_injection-1.1.0.tar.gz
Binary file not shown.
Binary file removed vendor/install/filesystem_tree-1.0.1.tar.gz
Binary file not shown.
Binary file removed vendor/install/first-2.0.1-py2.py3-none-any.whl
Binary file not shown.
Binary file removed vendor/install/python-mimeparse-0.1.4.tar.gz
Binary file not shown.
Binary file removed vendor/test/argparse-1.1.zip
Binary file not shown.
Binary file removed vendor/test/cov-core-1.7.tar.gz
Binary file not shown.
Binary file removed vendor/test/coverage-3.7.1.tar.gz
Binary file not shown.
Binary file removed vendor/test/py-1.4.20.tar.gz
Binary file not shown.
Binary file removed vendor/test/pytest-2.5.2.tar.gz
Binary file not shown.
Binary file removed vendor/test/pytest-cov-1.6.tar.gz
Binary file not shown.
Loading

0 comments on commit 5407264

Please sign in to comment.