Skip to content

Commit c6cd873

Browse files
author
Sylvain MARIE
committed
Fixed GHA issues by using compliant version of makefun for legacy distributions.
1 parent d59b842 commit c6cd873

3 files changed

Lines changed: 14 additions & 4 deletions

File tree

docs/changelog.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# Changelog
22

3+
### 1.15.5 - compatibility fix
4+
5+
- Fixed issue with legacy python 2.7 and 3.5. Fixes [#110](https://github.com/smarie/python-makefun/issues/110)
6+
37
### 1.15.4 - Python 3.13 official support
48

59
- Python 3.13 is now supported. PR [#108](https://github.com/smarie/python-makefun/pull/108) and PR

noxfile.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ def tests(session, coverage, pkg_specs):
136136
"-m", "pytest", "--cache-clear",
137137
f"--junitxml={Folders.test_xml}", f"--html={Folders.test_html}",
138138
"-v", "tests/")
139-
session.run("coverage", "report")
139+
session.run("coverage", "report") # this shows in terminal + fails under XX%, same as --cov-report term --cov-fail-under=70 # noqa
140140
session.run("coverage", "xml", "-o", f"{Folders.coverage_xml}")
141141
session.run("coverage", "html", "-d", f"{Folders.coverage_reports}")
142142
# delete this intermediate file, it is not needed anymore
@@ -154,7 +154,7 @@ def flake8(session):
154154
"""Launch flake8 qualimetry."""
155155

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

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

288-
# TODO filter
288+
# TODO filter ?
289289

290290
# print the list so that it can be caught by GHA.
291291
# Note that json.dumps is optional since this is a list of string.

setup.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,12 @@
3333
setup(
3434
download_url=DOWNLOAD_URL,
3535
use_scm_version={
36-
"write_to": "src/makefun/_version.py"
36+
"write_to": "src/makefun/_version.py",
37+
# Custom template to avoid type hints and annotations (python <3.8)
38+
"version_file_template": """# file generated by setuptools_scm
39+
# don't change, don't track in version control
40+
__version__ = version = '{version}'
41+
__version_tuple__ = version_tuple = {version_tuple}
42+
"""
3743
}, # we can't put `use_scm_version` in setup.cfg yet unfortunately
3844
)

0 commit comments

Comments
 (0)