Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: use src layout #332

Merged
merged 3 commits into from
Sep 18, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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.
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