Skip to content

Commit

Permalink
Fixed GHA issues by using compliant version of makefun for legacy dis…
Browse files Browse the repository at this point in the history
…tributions.
  • Loading branch information
Sylvain MARIE committed Sep 26, 2024
1 parent d59b842 commit c6cd873
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 4 deletions.
4 changes: 4 additions & 0 deletions docs/changelog.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Changelog

### 1.15.5 - compatibility fix

- Fixed issue with legacy python 2.7 and 3.5. Fixes [#110](https://github.com/smarie/python-makefun/issues/110)

### 1.15.4 - Python 3.13 official support

- Python 3.13 is now supported. PR [#108](https://github.com/smarie/python-makefun/pull/108) and PR
Expand Down
6 changes: 3 additions & 3 deletions noxfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ def tests(session, coverage, pkg_specs):
"-m", "pytest", "--cache-clear",
f"--junitxml={Folders.test_xml}", f"--html={Folders.test_html}",
"-v", "tests/")
session.run("coverage", "report")
session.run("coverage", "report") # this shows in terminal + fails under XX%, same as --cov-report term --cov-fail-under=70 # noqa
session.run("coverage", "xml", "-o", f"{Folders.coverage_xml}")
session.run("coverage", "html", "-d", f"{Folders.coverage_reports}")
# delete this intermediate file, it is not needed anymore
Expand All @@ -154,7 +154,7 @@ def flake8(session):
"""Launch flake8 qualimetry."""

session.install("-r", str(Folders.ci_tools / "flake8-requirements.txt"))
session.run("pip", "install", ".")
session.install(".")

rm_folder(Folders.flake8_reports)
Folders.flake8_reports.mkdir(parents=True, exist_ok=True)
Expand Down Expand Up @@ -285,7 +285,7 @@ def gha_list(session):
out = session.run("nox", "-l", "--json", "-s", "tests", external=True, silent=True)
sessions_list = [{"python": s["python"], "session": s["session"]} for s in json.loads(out)]

# TODO filter
# TODO filter ?

# print the list so that it can be caught by GHA.
# Note that json.dumps is optional since this is a list of string.
Expand Down
8 changes: 7 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,12 @@
setup(
download_url=DOWNLOAD_URL,
use_scm_version={
"write_to": "src/makefun/_version.py"
"write_to": "src/makefun/_version.py",
# Custom template to avoid type hints and annotations (python <3.8)
"version_file_template": """# file generated by setuptools_scm
# don't change, don't track in version control
__version__ = version = '{version}'
__version_tuple__ = version_tuple = {version_tuple}
"""
}, # we can't put `use_scm_version` in setup.cfg yet unfortunately
)

0 comments on commit c6cd873

Please sign in to comment.