summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBernat Gabor <bgabor8@bloomberg.net>2018-10-23 18:16:39 +0300
committerBernat Gabor <bgabor8@bloomberg.net>2018-10-23 18:16:39 +0300
commitaf5711ca9346b265f196a9cf266cecda9bca5b91 (patch)
tree9dad453e3f5966da70eae3895d0971eddbbb3e36
parent9d8d24179adb7674f0d8bdbeafb3a995bf0d4844 (diff)
downloadvirtualenv-af5711ca9346b265f196a9cf266cecda9bca5b91.tar.gz
move to src layout to fix coverage report
-rw-r--r--setup.py15
-rw-r--r--src/scripts/virtualenv (renamed from scripts/virtualenv)0
-rwxr-xr-xsrc/virtualenv.py (renamed from virtualenv.py)0
-rw-r--r--src/virtualenv_support/__init__.py (renamed from virtualenv_support/__init__.py)0
-rw-r--r--src/virtualenv_support/pip-18.0-py2.py3-none-any.whl (renamed from virtualenv_support/pip-18.0-py2.py3-none-any.whl)bin1307744 -> 1307744 bytes
-rw-r--r--src/virtualenv_support/setuptools-40.4.3-py2.py3-none-any.whl (renamed from virtualenv_support/setuptools-40.4.3-py2.py3-none-any.whl)bin569620 -> 569620 bytes
-rw-r--r--src/virtualenv_support/wheel-0.31.1-py2.py3-none-any.whl (renamed from virtualenv_support/wheel-0.31.1-py2.py3-none-any.whl)bin41567 -> 41567 bytes
-rw-r--r--tox.ini19
8 files changed, 19 insertions, 15 deletions
diff --git a/setup.py b/setup.py
index 7928ce0..8c724d3 100644
--- a/setup.py
+++ b/setup.py
@@ -4,9 +4,8 @@ import sys
if sys.version_info[:2] < (2, 7):
sys.exit('virtualenv requires Python 2.7 or higher.')
-
try:
- from setuptools import setup
+ from setuptools import setup, find_packages
from setuptools.command.test import test as TestCommand
class PyTest(TestCommand):
@@ -41,7 +40,7 @@ except ImportError:
'have to use "python -m virtualenv ENV"')
setup_params = {}
else:
- script = 'scripts/virtualenv'
+ script = 'src/scripts/virtualenv'
setup_params = {'scripts': [script]}
@@ -50,9 +49,10 @@ def read_file(*paths):
with open(os.path.join(here, *paths)) as f:
return f.read()
+
# Get long_description from index.rst:
-long_description = read_file('docs', 'index.rst')
-long_description = long_description.strip().split('split here', 1)[0]
+long_description_full = read_file('docs', 'index.rst')
+long_description = long_description_full.strip().split('split here', 1)[0]
# Add release history
changes = read_file('docs', 'changes.rst')
# Only report last two releases for brevity
@@ -75,7 +75,7 @@ long_description += '\n\n' + changes
def get_version():
- version_file = read_file('virtualenv.py')
+ version_file = read_file(os.path.join('src', 'virtualenv.py'))
version_match = re.search(r"^__version__ = ['\"]([^'\"]*)['\"]",
version_file, re.M)
if version_match:
@@ -116,8 +116,9 @@ setup(
maintainer_email='python-virtualenv@groups.google.com',
url='https://virtualenv.pypa.io/',
license='MIT',
+ package_dir={'': 'src'},
py_modules=['virtualenv'],
- packages=['virtualenv_support'],
+ packages=find_packages('src'),
package_data={'virtualenv_support': ['*.whl']},
python_requires='>=2.7,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*',
**setup_params)
diff --git a/scripts/virtualenv b/src/scripts/virtualenv
index c961dd7..c961dd7 100644
--- a/scripts/virtualenv
+++ b/src/scripts/virtualenv
diff --git a/virtualenv.py b/src/virtualenv.py
index e7e7111..e7e7111 100755
--- a/virtualenv.py
+++ b/src/virtualenv.py
diff --git a/virtualenv_support/__init__.py b/src/virtualenv_support/__init__.py
index e69de29..e69de29 100644
--- a/virtualenv_support/__init__.py
+++ b/src/virtualenv_support/__init__.py
diff --git a/virtualenv_support/pip-18.0-py2.py3-none-any.whl b/src/virtualenv_support/pip-18.0-py2.py3-none-any.whl
index 1a93cbe..1a93cbe 100644
--- a/virtualenv_support/pip-18.0-py2.py3-none-any.whl
+++ b/src/virtualenv_support/pip-18.0-py2.py3-none-any.whl
Binary files differ
diff --git a/virtualenv_support/setuptools-40.4.3-py2.py3-none-any.whl b/src/virtualenv_support/setuptools-40.4.3-py2.py3-none-any.whl
index 7b1402d..7b1402d 100644
--- a/virtualenv_support/setuptools-40.4.3-py2.py3-none-any.whl
+++ b/src/virtualenv_support/setuptools-40.4.3-py2.py3-none-any.whl
Binary files differ
diff --git a/virtualenv_support/wheel-0.31.1-py2.py3-none-any.whl b/src/virtualenv_support/wheel-0.31.1-py2.py3-none-any.whl
index cfd7b90..cfd7b90 100644
--- a/virtualenv_support/wheel-0.31.1-py2.py3-none-any.whl
+++ b/src/virtualenv_support/wheel-0.31.1-py2.py3-none-any.whl
Binary files differ
diff --git a/tox.ini b/tox.ini
index 8093622..c06a572 100644
--- a/tox.ini
+++ b/tox.ini
@@ -14,26 +14,29 @@ deps = mock
pytest-mock >= 1.10.0, <2
pytest-timeout >= 1.3.0, <2
commands = pytest {posargs:\
- --cov="virtualenv" \
+ --cov=virtualenv \
--cov-config="{toxinidir}/tox.ini" \
--timeout=180 \
--junitxml={env:JUNIT_XML_FILE:{toxworkdir}/.test.{envname}.xml} \
. }
+[testenv:.package]
+deps =
+
[coverage:run]
-branch = true
+branch = false
[coverage:report]
skip_covered = True
show_missing = True
[coverage:paths]
-source = virtualenv
- .tox/*/lib/python*/site-packages/virtualenv
- .tox/pypy*/site-packages/virtualenv
- .tox\*\Lib\site-packages\virtualenv
- */virtualenv
- *\virtualenv
+source = src
+ .tox/*/lib/python*/site-packages
+ .tox/pypy*/site-packages
+ .tox\*\Lib\site-packages
+ */virtualenv.py
+ *\virtualenv.py
[testenv:coverage]
description = [run locally after tests]: combine coverage data and create report;