Skip to content

Commit b172989

Browse files
committed
Include tests and tests data into the sdist
Close #116
1 parent 042b4be commit b172989

File tree

4 files changed

+15
-23
lines changed

4 files changed

+15
-23
lines changed

.github/workflows/pypi_upload.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@ jobs:
1616
steps:
1717
- name: Checkout code
1818
uses: actions/checkout@v2
19+
with:
20+
submodules: true
1921

2022
- name: Create Release
2123
id: create_release
@@ -35,10 +37,10 @@ jobs:
3537

3638
- name: Install latest tools for build
3739
run: |
38-
python -m pip install invoke -e .[dev]
40+
python -m pip install build invoke -e .[dev]
3941
- name: Build wheels
4042
run: |
41-
inv build
43+
python -m build
4244
- name: Upload to PyPI via Twine
4345
# to upload to test pypi, pass --repository-url https://test.pypi.org/legacy/ and use secrets.TEST_PYPI_TOKEN
4446
run: |

MANIFEST.in

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,19 +6,15 @@ include pyproject.toml
66
exclude .pre-commit-config.yaml
77
exclude .editorconfig
88
exclude .coveragerc
9-
exclude .travis.yml
10-
exclude azure-pipelines.yml
119
exclude tox.ini
12-
exclude appveyor.yml
13-
exclude Pipfile*
1410
exclude README.md
1511

1612
recursive-include docs Makefile *.rst *.py *.bat
17-
recursive-exclude .azure-pipelines *.yml
1813
recursive-exclude docs requirements*.txt
14+
recursive-include tests *.py
15+
recursive-include tests/test_artifacts *
1916

2017
prune .github
2118
prune docs/build
2219
prune news
2320
prune tasks
24-
prune tests

news/116.bugfix.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Include tests and tests data into the sdist.

src/pythonfinder/cli.py

Lines changed: 8 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -8,32 +8,25 @@
88

99

1010
@click.command()
11-
@click.option("--find", default=False, nargs=1, help="Find a specific python version.")
12-
@click.option("--which", default=False, nargs=1, help="Run the which command.")
11+
@click.option("--find", nargs=1, help="Find a specific python version.")
12+
@click.option("--which", nargs=1, help="Run the which command.")
1313
@click.option("--findall", is_flag=True, default=False, help="Find all python versions.")
1414
@click.option(
15-
"--version", is_flag=True, default=False, help="Display PythonFinder version."
16-
)
17-
@click.option(
18-
"--ignore-unsupported/--no-unsupported",
15+
"--ignore-unsupported",
16+
"--no-unsupported",
1917
is_flag=True,
2018
default=True,
2119
envvar="PYTHONFINDER_IGNORE_UNSUPPORTED",
2220
help="Ignore unsupported python versions.",
2321
)
24-
@click.version_option(prog_name="pyfinder", version=__version__)
22+
@click.version_option(
23+
prog_name=click.style("PythonFinder", bold=True),
24+
version=click.style(__version__, fg="yellow"),
25+
)
2526
@click.pass_context
2627
def cli(
2728
ctx, find=False, which=False, findall=False, version=False, ignore_unsupported=True
2829
):
29-
if version:
30-
click.echo(
31-
"{0} version {1}".format(
32-
click.style("PythonFinder", fg="white", bold=True),
33-
click.style(str(__version__), fg="yellow"),
34-
)
35-
)
36-
ctx.exit()
3730
finder = Finder(ignore_unsupported=ignore_unsupported)
3831
if findall:
3932
versions = [v for v in finder.find_all_python_versions()]

0 commit comments

Comments
 (0)