Merge ~cjwatson/lazr.delegates:src-layout into lazr.delegates:main

Proposed by Colin Watson
Status: Merged
Merged at revision: beb45419ab04683d44f44b4835ca654391bc27f3
Proposed branch: ~cjwatson/lazr.delegates:src-layout
Merge into: lazr.delegates:main
Diff against target: 162 lines (+14/-7)
7 files modified
.gitignore (+1/-1)
MANIFEST.in (+1/-1)
dev/null (+0/-1)
setup.py (+3/-2)
src/lazr/delegates/docs/CONTRIBUTING.rst (+1/-0)
src/lazr/delegates/docs/NEWS.rst (+1/-0)
tox.ini (+7/-2)
Reviewer Review Type Date Requested Status
Jürgen Gmach Approve
Review via email: mp+412215@code.launchpad.net

Commit message

Switch to a src directory layout

To post a comment you must log in.
Revision history for this message
Jürgen Gmach (jugmac00) wrote (last edit ):

You need to apply the following patch...

$ git diff
diff --git a/tox.ini b/tox.ini
index 0d823c9..10d788b 100644
--- a/tox.ini
+++ b/tox.ini
@@ -42,3 +42,8 @@ commands =
 source = lazr.delegates
 omit = */docs/conf.py
 parallel = true
+
+[coverage:paths]
+source =
+ src
+ .tox/*/site-packages

otherwise - as we now test the actual packages and not the source - the executed paths will look like .tox/py38/lib/python3.8/site-packages/lazr/delegates/__init__.py and coverage combine would break.

Sorry, that goes on me for my coverage combine ambition.

review: Needs Fixing
Revision history for this message
Colin Watson (cjwatson) wrote :

Thanks! I'd noticed some oddities, so I appreciate you tracking those down. Done.

Revision history for this message
Jürgen Gmach (jugmac00) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
diff --git a/.gitignore b/.gitignore
index 16ba64f..ca6d0d8 100644
--- a/.gitignore
+++ b/.gitignore
@@ -14,4 +14,4 @@ __pycache__
14htmlcov14htmlcov
15.tox15.tox
16*.pyc16*.pyc
17lazr/delegates/docs/_build17src/lazr/delegates/docs/_build
diff --git a/MANIFEST.in b/MANIFEST.in
index 0caef62..c722bb4 100644
--- a/MANIFEST.in
+++ b/MANIFEST.in
@@ -1,3 +1,3 @@
1include *.py *.txt *.rst MANIFEST.in *.ini1include *.py *.txt *.rst MANIFEST.in *.ini
2recursive-include lazr *.rst2recursive-include src/lazr *.rst
3exclude .bzrignore3exclude .bzrignore
diff --git a/lazr/delegates/docs/CONTRIBUTING.rst b/lazr/delegates/docs/CONTRIBUTING.rst
4deleted file mode 1200004deleted file mode 120000
index ac9338f..0000000
--- a/lazr/delegates/docs/CONTRIBUTING.rst
+++ /dev/null
@@ -1 +0,0 @@
1../../../CONTRIBUTING.rst
2\ No newline at end of file0\ No newline at end of file
diff --git a/lazr/delegates/docs/NEWS.rst b/lazr/delegates/docs/NEWS.rst
3deleted file mode 1200001deleted file mode 120000
index c95df2b..0000000
--- a/lazr/delegates/docs/NEWS.rst
+++ /dev/null
@@ -1 +0,0 @@
1../../../NEWS.rst
2\ No newline at end of file0\ No newline at end of file
diff --git a/setup.py b/setup.py
index bfe9891..abe2368 100755
--- a/setup.py
+++ b/setup.py
@@ -16,14 +16,15 @@
1616
17from setuptools import setup, find_packages17from setuptools import setup, find_packages
1818
19with open('lazr/delegates/_version.py') as version_file:19with open('src/lazr/delegates/_version.py') as version_file:
20 exec(version_file.read()) # sets __version__20 exec(version_file.read()) # sets __version__
2121
22setup(22setup(
23 name='lazr.delegates',23 name='lazr.delegates',
24 version=__version__,24 version=__version__,
25 namespace_packages=['lazr'],25 namespace_packages=['lazr'],
26 packages=find_packages(),26 packages=find_packages('src'),
27 package_dir={'': 'src'},
27 include_package_data=True,28 include_package_data=True,
28 zip_safe=False,29 zip_safe=False,
29 maintainer='LAZR Developers',30 maintainer='LAZR Developers',
diff --git a/lazr/__init__.py b/src/lazr/__init__.py
30similarity index 100%31similarity index 100%
31rename from lazr/__init__.py32rename from lazr/__init__.py
32rename to src/lazr/__init__.py33rename to src/lazr/__init__.py
diff --git a/lazr/delegates/__init__.py b/src/lazr/delegates/__init__.py
33similarity index 100%34similarity index 100%
34rename from lazr/delegates/__init__.py35rename from lazr/delegates/__init__.py
35rename to src/lazr/delegates/__init__.py36rename to src/lazr/delegates/__init__.py
diff --git a/lazr/delegates/_delegates.py b/src/lazr/delegates/_delegates.py
36similarity index 100%37similarity index 100%
37rename from lazr/delegates/_delegates.py38rename from lazr/delegates/_delegates.py
38rename to src/lazr/delegates/_delegates.py39rename to src/lazr/delegates/_delegates.py
diff --git a/lazr/delegates/_passthrough.py b/src/lazr/delegates/_passthrough.py
39similarity index 100%40similarity index 100%
40rename from lazr/delegates/_passthrough.py41rename from lazr/delegates/_passthrough.py
41rename to src/lazr/delegates/_passthrough.py42rename to src/lazr/delegates/_passthrough.py
diff --git a/lazr/delegates/_python2.py b/src/lazr/delegates/_python2.py
42similarity index 100%43similarity index 100%
43rename from lazr/delegates/_python2.py44rename from lazr/delegates/_python2.py
44rename to src/lazr/delegates/_python2.py45rename to src/lazr/delegates/_python2.py
diff --git a/lazr/delegates/_python3.py b/src/lazr/delegates/_python3.py
45similarity index 100%46similarity index 100%
46rename from lazr/delegates/_python3.py47rename from lazr/delegates/_python3.py
47rename to src/lazr/delegates/_python3.py48rename to src/lazr/delegates/_python3.py
diff --git a/lazr/delegates/_version.py b/src/lazr/delegates/_version.py
48similarity index 100%49similarity index 100%
49rename from lazr/delegates/_version.py50rename from lazr/delegates/_version.py
50rename to src/lazr/delegates/_version.py51rename to src/lazr/delegates/_version.py
diff --git a/src/lazr/delegates/docs/CONTRIBUTING.rst b/src/lazr/delegates/docs/CONTRIBUTING.rst
51new file mode 12000052new file mode 120000
index 0000000..1d05313
--- /dev/null
+++ b/src/lazr/delegates/docs/CONTRIBUTING.rst
@@ -0,0 +1 @@
1../../../../CONTRIBUTING.rst
0\ No newline at end of file2\ No newline at end of file
diff --git a/src/lazr/delegates/docs/NEWS.rst b/src/lazr/delegates/docs/NEWS.rst
1new file mode 1200003new file mode 120000
index 0000000..27b815d
--- /dev/null
+++ b/src/lazr/delegates/docs/NEWS.rst
@@ -0,0 +1 @@
1../../../../NEWS.rst
0\ No newline at end of file2\ No newline at end of file
diff --git a/lazr/delegates/docs/__init__.py b/src/lazr/delegates/docs/__init__.py
1similarity index 100%3similarity index 100%
2rename from lazr/delegates/docs/__init__.py4rename from lazr/delegates/docs/__init__.py
3rename to src/lazr/delegates/docs/__init__.py5rename to src/lazr/delegates/docs/__init__.py
diff --git a/lazr/delegates/docs/conf.py b/src/lazr/delegates/docs/conf.py
4similarity index 100%6similarity index 100%
5rename from lazr/delegates/docs/conf.py7rename from lazr/delegates/docs/conf.py
6rename to src/lazr/delegates/docs/conf.py8rename to src/lazr/delegates/docs/conf.py
diff --git a/lazr/delegates/docs/index.rst b/src/lazr/delegates/docs/index.rst
7similarity index 100%9similarity index 100%
8rename from lazr/delegates/docs/index.rst10rename from lazr/delegates/docs/index.rst
9rename to src/lazr/delegates/docs/index.rst11rename to src/lazr/delegates/docs/index.rst
diff --git a/lazr/delegates/tests/__init__.py b/src/lazr/delegates/tests/__init__.py
10similarity index 100%12similarity index 100%
11rename from lazr/delegates/tests/__init__.py13rename from lazr/delegates/tests/__init__.py
12rename to src/lazr/delegates/tests/__init__.py14rename to src/lazr/delegates/tests/__init__.py
diff --git a/lazr/delegates/tests/test_api.py b/src/lazr/delegates/tests/test_api.py
13similarity index 100%15similarity index 100%
14rename from lazr/delegates/tests/test_api.py16rename from lazr/delegates/tests/test_api.py
15rename to src/lazr/delegates/tests/test_api.py17rename to src/lazr/delegates/tests/test_api.py
diff --git a/lazr/delegates/tests/test_docs.py b/src/lazr/delegates/tests/test_docs.py
16similarity index 100%18similarity index 100%
17rename from lazr/delegates/tests/test_docs.py19rename from lazr/delegates/tests/test_docs.py
18rename to src/lazr/delegates/tests/test_docs.py20rename to src/lazr/delegates/tests/test_docs.py
diff --git a/lazr/delegates/tests/test_passthrough.py b/src/lazr/delegates/tests/test_passthrough.py
19similarity index 100%21similarity index 100%
20rename from lazr/delegates/tests/test_passthrough.py22rename from lazr/delegates/tests/test_passthrough.py
21rename to src/lazr/delegates/tests/test_passthrough.py23rename to src/lazr/delegates/tests/test_passthrough.py
diff --git a/lazr/delegates/tests/test_python2.py b/src/lazr/delegates/tests/test_python2.py
22similarity index 100%24similarity index 100%
23rename from lazr/delegates/tests/test_python2.py25rename from lazr/delegates/tests/test_python2.py
24rename to src/lazr/delegates/tests/test_python2.py26rename to src/lazr/delegates/tests/test_python2.py
diff --git a/tox.ini b/tox.ini
index 57b23f3..10d788b 100644
--- a/tox.ini
+++ b/tox.ini
@@ -15,13 +15,13 @@ deps =
15 zope.testrunner15 zope.testrunner
16 coverage16 coverage
17commands =17commands =
18 coverage run -m zope.testrunner --test-path . --tests-pattern ^tests {posargs}18 coverage run -m zope.testrunner --test-path src --tests-pattern ^tests {posargs}
1919
20[testenv:docs]20[testenv:docs]
21basepython =21basepython =
22 python322 python3
23commands =23commands =
24 sphinx-build -b html -d lazr/delegates/docs/_build/doctrees lazr/delegates/docs lazr/delegates/docs/_build/html24 sphinx-build -b html -d src/lazr/delegates/docs/_build/doctrees src/lazr/delegates/docs src/lazr/delegates/docs/_build/html
25deps =25deps =
26 .[docs]26 .[docs]
2727
@@ -42,3 +42,8 @@ commands =
42source = lazr.delegates42source = lazr.delegates
43omit = */docs/conf.py43omit = */docs/conf.py
44parallel = true44parallel = true
45
46[coverage:paths]
47source =
48 src
49 .tox/*/site-packages

Subscribers

People subscribed via source and target branches

to all changes: