Skip to content

Commit caa9cdf

Browse files
authored
Rename src_py3 to src (#965)
1 parent 28b64f4 commit caa9cdf

File tree

9 files changed

+79
-12
lines changed

9 files changed

+79
-12
lines changed

.flake8

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,4 @@ ignore =
1212
exclude =
1313
# tests have more relaxed formatting rules
1414
# and its own specific config in .flake8-tests
15-
typing_extensions/src_py3/test_typing_extensions.py,
15+
typing_extensions/src/test_typing_extensions.py,

.github/workflows/ci.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ jobs:
3030
run: |
3131
# Be wary of running `pip install` here, since it becomes easy for us to
3232
# accidentally pick up typing_extensions as installed by a dependency
33-
cd typing_extensions/src_py3
33+
cd typing_extensions/src
3434
python -m unittest test_typing_extensions.py
3535
3636
linting:
@@ -63,4 +63,4 @@ jobs:
6363
run: flake8
6464

6565
- name: Lint tests
66-
run: flake8 --config=.flake8-tests typing_extensions/src_py3/test_typing_extensions.py
66+
run: flake8 --config=.flake8-tests typing_extensions/src/test_typing_extensions.py

.github/workflows/package.yml

+71
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
name: Test packaging
2+
3+
on:
4+
push:
5+
pull_request:
6+
7+
permissions:
8+
contents: read
9+
10+
jobs:
11+
wheel:
12+
name: Test wheel install
13+
runs-on: ubuntu-latest
14+
15+
steps:
16+
- uses: actions/checkout@v2
17+
18+
- name: Set up Python
19+
uses: actions/setup-python@v2
20+
with:
21+
python-version: 3
22+
23+
- name: Install pypa/build
24+
run: |
25+
# Be wary of running `pip install` here, since it becomes easy for us to
26+
# accidentally pick up typing_extensions as installed by a dependency
27+
python -m pip install --upgrade build
28+
python -m pip list
29+
30+
- name: Build and install wheel
31+
run: |
32+
cd typing_extensions
33+
python -m build .
34+
export path_to_file=$(find dist -type f -name "typing_extensions-*.whl")
35+
echo "::notice::Installing wheel: $path_to_file"
36+
pip install -vvv $path_to_file
37+
python -m pip list
38+
39+
- name: Attempt to import typing_extensions
40+
run: python -c "import typing_extensions; print(typing_extensions.__all__)"
41+
42+
sdist:
43+
name: Test sdist install
44+
runs-on: ubuntu-latest
45+
46+
steps:
47+
- uses: actions/checkout@v2
48+
49+
- name: Set up Python
50+
uses: actions/setup-python@v2
51+
with:
52+
python-version: 3
53+
54+
- name: Install pypa/build
55+
run: |
56+
# Be wary of running `pip install` here, since it becomes easy for us to
57+
# accidentally pick up typing_extensions as installed by a dependency
58+
python -m pip install --upgrade build
59+
python -m pip list
60+
61+
- name: Build and install sdist
62+
run: |
63+
cd typing_extensions
64+
python -m build .
65+
export path_to_file=$(find dist -type f -name "typing_extensions-*.tar.gz")
66+
echo "::notice::Installing sdist: $path_to_file"
67+
pip install -vvv $path_to_file
68+
python -m pip list
69+
70+
- name: Attempt to import typing_extensions
71+
run: python -c "import typing_extensions; print(typing_extensions.__all__)"

CONTRIBUTING.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -34,10 +34,10 @@ backwards-incompatible changes.
3434

3535
- Build the source and wheel distributions:
3636

37-
- `pip3 install -U flit`
37+
- `python -m pip install --upgrade build`
3838
- `cd typing_extensions`
3939
- `rm -rf dist/`
40-
- `flit build --no-setup-py`
40+
- `python -m build .`
4141

4242
- Install the built distributions locally and test (if you were using `tox`, you already
4343
tested the source distribution).

typing_extensions/MANIFEST.in

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
include CHANGELOG LICENSE README.rst
2-
include src_py3/typing_extensions.py
3-
include src_py3/test_typing_extensions.py
2+
include src/typing_extensions.py
3+
include src/test_typing_extensions.py

typing_extensions/pyproject.toml

-4
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,3 @@ classifiers = [
6161
[[project.authors]]
6262
name = "Guido van Rossum, Jukka Lehtosalo, Łukasz Langa, Michael Lee"
6363
64-
65-
# This tells Flit that the module is stored in the src_py3 directory.
66-
[tool.flit.module]
67-
name = "src_py3/typing_extensions"

typing_extensions/tox.ini

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@
22
envlist = py36, py37, py38, py39
33

44
[testenv]
5-
changedir = src_py3
5+
changedir = src
66
commands = python -m unittest discover

0 commit comments

Comments
 (0)