Move package into src directory
Prevents accidental imports when running tests.
This commit is contained in:
parent
140c8c9288
commit
4c39a185ad
|
@ -1,7 +1,11 @@
|
|||
[run]
|
||||
branch = True
|
||||
omit = attr/_compat.py
|
||||
source = attr
|
||||
|
||||
[paths]
|
||||
source =
|
||||
src/attr
|
||||
.tox/*/lib/python*/site-packages/attr
|
||||
.tox/pypy/site-packages/attr
|
||||
[report]
|
||||
show_missing = True
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
.tox
|
||||
.coverage
|
||||
.coverage*
|
||||
*.pyc
|
||||
*.egg-info
|
||||
docs/_build/
|
||||
|
|
|
@ -90,7 +90,7 @@ copyright = u'2015{0}, Hynek Schlawack'.format(
|
|||
# built documents.
|
||||
#
|
||||
# The short X.Y version.
|
||||
release = find_version("../attr/__init__.py")
|
||||
release = find_version("../src/attr/__init__.py")
|
||||
version = release.rsplit(u".", 1)[0]
|
||||
# The full version, including alpha/beta/rc tags.
|
||||
|
||||
|
|
5
setup.py
5
setup.py
|
@ -8,8 +8,8 @@ from setuptools import setup, find_packages
|
|||
###############################################################################
|
||||
|
||||
NAME = "attrs"
|
||||
PACKAGES = find_packages(exclude=["tests*"])
|
||||
META_PATH = os.path.join("attr", "__init__.py")
|
||||
PACKAGES = find_packages(where="src", exclude=["tests*"])
|
||||
META_PATH = os.path.join("src", "attr", "__init__.py")
|
||||
KEYWORDS = ["class", "attribute", "boilerplate"]
|
||||
CLASSIFIERS = [
|
||||
"Development Status :: 5 - Production/Stable",
|
||||
|
@ -75,6 +75,7 @@ if __name__ == "__main__":
|
|||
keywords=KEYWORDS,
|
||||
long_description=read("README.rst"),
|
||||
packages=PACKAGES,
|
||||
package_dir={"": "src"},
|
||||
zip_safe=False,
|
||||
classifiers=CLASSIFIERS,
|
||||
install_requires=INSTALL_REQUIRES,
|
||||
|
|
20
tox.ini
20
tox.ini
|
@ -1,5 +1,5 @@
|
|||
[tox]
|
||||
envlist = py26, py27, py33, py34, py35, pypy, flake8, manifest, docs
|
||||
envlist = coverage-clean, py26, py27, py33, py34, py35, pypy, flake8, manifest, docs, coverage-report
|
||||
|
||||
[testenv]
|
||||
passenv = TERM # ensure colors
|
||||
|
@ -8,15 +8,14 @@ deps =
|
|||
pytest>=2.7.2 # see https://github.com/hynek/attrs/issues/14
|
||||
zope.interface
|
||||
commands =
|
||||
coverage run {envbindir}/py.test tests
|
||||
coverage report -m
|
||||
coverage run --parallel -m pytest tests
|
||||
|
||||
|
||||
[testenv:flake8]
|
||||
basepython = python2.7
|
||||
deps =
|
||||
flake8
|
||||
commands = flake8 attr tests setup.py
|
||||
commands = flake8 src tests setup.py
|
||||
|
||||
|
||||
[testenv:docs]
|
||||
|
@ -37,3 +36,16 @@ deps =
|
|||
check-manifest
|
||||
commands =
|
||||
check-manifest
|
||||
|
||||
[testenv:coverage-clean]
|
||||
deps = coverage
|
||||
skip_install = true
|
||||
commands = coverage erase
|
||||
|
||||
[testenv:coverage-report]
|
||||
basepython = python3.5
|
||||
deps = coverage
|
||||
skip_install = true
|
||||
commands =
|
||||
coverage combine
|
||||
coverage report
|
||||
|
|
Loading…
Reference in New Issue