Skip to content

Commit

Permalink
Added pyproject.toml and MANIFEST.in , needed to properly declare tha…
Browse files Browse the repository at this point in the history
…t requirements.txt must be included, so generated wheels include the right dependencies
  • Loading branch information
jmfernandez committed Jul 12, 2023
1 parent 0b3321d commit 8ae1380
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 1 deletion.
3 changes: 3 additions & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
include LICENSE
include README.md
include requirements.txt
20 changes: 20 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
[build-system]
requires = [
"setuptools>=42",
"wheel"
]
build-backend = "setuptools.build_meta"

[mypy]
warn_redundant_casts=true
warn_unused_ignores=true

[tool.yapf]
based_on_style="pep8"
continuation_align_style="valign-right"
dedent_closing_brackets=true
force_multiline_dict=true
spaces_around_dict_delimiters=true
spaces_around_list_delimiters=true
split_all_comma_separated_values=true
use_tabs=true
3 changes: 2 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,10 @@
requirements = []
requirements_path = os.path.join(setupDir, "requirements.txt")
if os.path.exists(requirements_path):
with open(requirements_path) as f:
with open(requirements_path, mode="r", encoding="utf-8") as f:
egg = re.compile(r"#[^#]*egg=([^=&]+)")
for line in f.read().splitlines():
print(f"R {line}")
m = egg.search(line)
requirements.append(line if m is None else m.group(1))

Expand Down

0 comments on commit 8ae1380

Please sign in to comment.