Skip to content

Commit

Permalink
chore: use src layout (#332)
Browse files Browse the repository at this point in the history
  • Loading branch information
mayeut authored Sep 18, 2021
1 parent 16b2e80 commit 82d8651
Show file tree
Hide file tree
Showing 43 changed files with 21 additions and 10 deletions.
4 changes: 2 additions & 2 deletions .coveragerc
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ omit=

[paths]
source =
auditwheel/
/auditwheel_src/auditwheel
src/auditwheel/
/auditwheel_src/src/auditwheel

[report]
exclude_lines =
Expand Down
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
default_language_version:
python: python3.6

exclude: ^auditwheel/_vendor/
exclude: ^src/auditwheel/_vendor/

repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
Expand Down
6 changes: 4 additions & 2 deletions noxfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ def coverage(session: nox.Session) -> None:
"""
Run coverage using unit tests.
"""
session.install("-r", "test-requirements.txt", "pytest-cov")
session.install("-r", "test-requirements.txt", "pytest-cov", ".")
session.run(
"python",
"-m",
Expand All @@ -39,8 +39,10 @@ def _docker_images(session: nox.Session) -> List[str]:
images_file = tmp_dir / "images.lst"
script.write_text(
fr"""
import sys
from pathlib import Path
from tests.integration.test_manylinux import MANYLINUX_IMAGES
sys.path.append("./tests/integration")
from test_manylinux import MANYLINUX_IMAGES
images = "\n".join(MANYLINUX_IMAGES.values())
Path(r"{images_file}").write_text(images)
"""
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[build-system]
requires = ["setuptools", "wheel", "pbr"]
requires = ["setuptools>=42", "wheel", "pbr"]
build-backend = "setuptools.build_meta"

[tool.black]
Expand Down
15 changes: 12 additions & 3 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,19 @@ classifier =
skip_changelog = 1
skip_authors = 1

[files]
packages = auditwheel
[options]
include_package_data = True
packages = find:
package_dir =
=src

[entry_points]
[options.package_data]
auditwheel = *.json

[options.packages.find]
where = src

[options.entry_points]
console_scripts =
auditwheel = auditwheel.main:main

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion tests/integration/test_manylinux.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@
def find_src_folder():
candidate = op.abspath(op.join(op.dirname(__file__), "../.."))
contents = os.listdir(candidate)
if "setup.py" in contents and "auditwheel" in contents:
if "setup.py" in contents and "src" in contents:
return candidate


Expand Down

0 comments on commit 82d8651

Please sign in to comment.