mirror of
https://pagure.io/fm-orchestrator.git
synced 2026-02-02 20:59:06 +08:00
Stop using site_packages when running tox
This commit is contained in:
1
Vagrantfile
vendored
1
Vagrantfile
vendored
@@ -10,7 +10,6 @@ $script = <<SCRIPT
|
||||
fedmsg-relay \
|
||||
fedpkg \
|
||||
gcc \
|
||||
gcc \
|
||||
gcc-c++ \
|
||||
git \
|
||||
koji \
|
||||
|
||||
@@ -9,6 +9,7 @@ futures # Python 2 only
|
||||
httplib2
|
||||
kerberos
|
||||
kobo>=0.5.0
|
||||
koji
|
||||
ldap3
|
||||
m2crypto
|
||||
m2ext
|
||||
|
||||
28
setup.py
28
setup.py
@@ -1,10 +1,25 @@
|
||||
from os import path
|
||||
|
||||
from setuptools import setup, find_packages
|
||||
|
||||
with open('requirements.txt') as f:
|
||||
requirements = f.readlines()
|
||||
|
||||
with open('test-requirements.txt') as f:
|
||||
test_requirements = f.readlines()
|
||||
def read_requirements(filename):
|
||||
specifiers = []
|
||||
dep_links = []
|
||||
with open(filename, 'r') as f:
|
||||
for line in f:
|
||||
if line.startswith('-r') or line.strip() == '':
|
||||
continue
|
||||
if line.startswith('git+'):
|
||||
dep_links.append(line.strip())
|
||||
else:
|
||||
specifiers.append(line.strip())
|
||||
return specifiers, dep_links
|
||||
|
||||
|
||||
setup_py_path = path.dirname(path.realpath(__file__))
|
||||
install_requires, deps_links = read_requirements(path.join(setup_py_path, 'requirements.txt'))
|
||||
tests_require, _ = read_requirements(path.join(setup_py_path, 'test-requirements.txt'))
|
||||
|
||||
setup(name='module-build-service',
|
||||
description='The Module Build Service for Modularity',
|
||||
@@ -21,8 +36,9 @@ setup(name='module-build-service',
|
||||
packages=find_packages(),
|
||||
include_package_data=True,
|
||||
zip_safe=False,
|
||||
install_requires=requirements,
|
||||
tests_require=test_requirements,
|
||||
install_requires=install_requires,
|
||||
tests_require=tests_require,
|
||||
dependency_links=deps_links,
|
||||
entry_points={
|
||||
'console_scripts': ['mbs-upgradedb = module_build_service.manage:upgradedb',
|
||||
'mbs-frontend = module_build_service.manage:run',
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
-r requirements.txt
|
||||
|
||||
copr
|
||||
mock
|
||||
nose
|
||||
|
||||
14
tox.ini
14
tox.ini
@@ -10,16 +10,10 @@ envlist = py27, coverage, flake8, bandit
|
||||
max-line-length = 100
|
||||
|
||||
[testenv]
|
||||
# using sitepackages is not a good idea, but Koji... :(
|
||||
sitepackages = True
|
||||
install_command = pip install --force-reinstall --ignore-installed {packages}
|
||||
deps =
|
||||
copr
|
||||
mock
|
||||
nose
|
||||
pytest
|
||||
vcrpy
|
||||
commands = py.test -v {posargs}
|
||||
usedevelop = true
|
||||
deps = -r{toxinidir}/test-requirements.txt
|
||||
commands =
|
||||
py.test {posargs}
|
||||
|
||||
[testenv:coverage]
|
||||
basepython = python2
|
||||
|
||||
Reference in New Issue
Block a user