Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rename src_py3 to src #965

Merged
merged 3 commits into from
Nov 25, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .flake8
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@ ignore =
exclude =
# tests have more relaxed formatting rules
# and its own specific config in .flake8-tests
typing_extensions/src_py3/test_typing_extensions.py,
typing_extensions/src/test_typing_extensions.py,
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
run: |
# Be wary of running `pip install` here, since it becomes easy for us to
# accidentally pick up typing_extensions as installed by a dependency
cd typing_extensions/src_py3
cd typing_extensions/src
python -m unittest test_typing_extensions.py

linting:
Expand Down Expand Up @@ -63,4 +63,4 @@ jobs:
run: flake8

- name: Lint tests
run: flake8 --config=.flake8-tests typing_extensions/src_py3/test_typing_extensions.py
run: flake8 --config=.flake8-tests typing_extensions/src/test_typing_extensions.py
71 changes: 71 additions & 0 deletions .github/workflows/package.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
name: Test packaging

on:
push:
pull_request:

permissions:
contents: read

jobs:
wheel:
name: Test wheel install
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2

- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: 3

- name: Install pypa/build
run: |
# Be wary of running `pip install` here, since it becomes easy for us to
# accidentally pick up typing_extensions as installed by a dependency
python -m pip install --upgrade build
python -m pip list

- name: Build and install wheel
run: |
cd typing_extensions
python -m build .
export path_to_file=$(find dist -type f -name "typing_extensions-*.whl")
echo "::notice::Installing wheel: $path_to_file"
pip install -vvv $path_to_file
python -m pip list

- name: Attempt to import typing_extensions
run: python -c "import typing_extensions; print(typing_extensions.__all__)"

sdist:
name: Test sdist install
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2

- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: 3

- name: Install pypa/build
run: |
# Be wary of running `pip install` here, since it becomes easy for us to
# accidentally pick up typing_extensions as installed by a dependency
python -m pip install --upgrade build
python -m pip list

- name: Build and install sdist
run: |
cd typing_extensions
python -m build .
export path_to_file=$(find dist -type f -name "typing_extensions-*.tar.gz")
echo "::notice::Installing sdist: $path_to_file"
pip install -vvv $path_to_file
python -m pip list

- name: Attempt to import typing_extensions
run: python -c "import typing_extensions; print(typing_extensions.__all__)"
4 changes: 2 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,10 @@ backwards-incompatible changes.

- Build the source and wheel distributions:

- `pip3 install -U flit`
- `python -m pip install --upgrade build`
- `cd typing_extensions`
- `rm -rf dist/`
- `flit build --no-setup-py`
- `python -m build .`

- Install the built distributions locally and test (if you were using `tox`, you already
tested the source distribution).
Expand Down
4 changes: 2 additions & 2 deletions typing_extensions/MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
include CHANGELOG LICENSE README.rst
include src_py3/typing_extensions.py
include src_py3/test_typing_extensions.py
include src/typing_extensions.py
include src/test_typing_extensions.py
4 changes: 0 additions & 4 deletions typing_extensions/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,3 @@ classifiers = [
[[project.authors]]
name = "Guido van Rossum, Jukka Lehtosalo, Łukasz Langa, Michael Lee"
email = "[email protected]"

# This tells Flit that the module is stored in the src_py3 directory.
[tool.flit.module]
name = "src_py3/typing_extensions"
2 changes: 1 addition & 1 deletion typing_extensions/tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@
envlist = py36, py37, py38, py39

[testenv]
changedir = src_py3
changedir = src
commands = python -m unittest discover