Skip to content

Commit 0eb4af2

Browse files
2.6.0 RC2 build tools
1 parent 3a444ab commit 0eb4af2

File tree

3 files changed

+18
-24
lines changed

3 files changed

+18
-24
lines changed

.github/workflows/build_wheels.yml

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,8 @@ jobs:
2121
- name: Upgrade pip
2222
run: python -m pip install --upgrade pip
2323

24-
- name: Install typed-ast (mypy dep) on windows for pypy wheels
25-
if: matrix.os == 'windows-2019'
26-
run: python -m pip install typed-ast
27-
2824
- name: Set up Environment
29-
run: echo "CIBW_SKIP=pp36-* pp37-*" >> $GITHUB_ENV
25+
run: echo "CIBW_SKIP=pp36-* pp37-* pp38-*" >> $GITHUB_ENV
3026

3127
- name: Check ENV
3228
if: matrix.os == 'ubuntu-20.04'

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ websockets = "11.0.3"
4242
[tool.poetry.dev-dependencies]
4343

4444
[build-system]
45-
requires = ["setuptools", "wheel", "Cython", "pip"] # mypy is installed my the github action to exclude pypy
45+
requires = ["setuptools", "wheel", "Cython", "pip", "mypy"]
4646
build-backend = "setuptools.build_meta"
4747

4848
[tool.poetry.package_data]

setup.py

Lines changed: 16 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@
2121
from Cython.Build import cythonize
2222
from setuptools import setup, find_packages, Extension
2323
import os
24-
import platform
2524
import shutil
2625
import subprocess
2726

@@ -34,23 +33,22 @@
3433
]
3534

3635
# Setup
37-
if platform.python_implementation() != 'PyPy':
38-
print("Generating stub files ...")
39-
os.makedirs(stubs_dir, exist_ok=True)
40-
for filename in os.listdir(source_dir):
41-
if filename.endswith('.py'):
42-
source_path = os.path.join(source_dir, filename)
43-
subprocess.run(['stubgen', '-o', stubs_dir, source_path], check=True)
44-
for stub_file in os.listdir(os.path.join(stubs_dir, source_dir)):
45-
if stub_file.endswith('.pyi'):
46-
source_stub_path = os.path.join(stubs_dir, source_dir, stub_file)
47-
if os.path.exists(os.path.join(source_dir, stub_file)):
48-
print(f"Skipped moving {source_stub_path} because {os.path.join(source_dir, stub_file)} already exists!")
49-
else:
50-
shutil.move(source_stub_path, source_dir)
51-
print(f"Moved {source_stub_path} to {source_dir}!")
52-
shutil.rmtree(os.path.join(stubs_dir))
53-
print("Stub files generated and moved successfully.")
36+
print("Generating stub files ...")
37+
os.makedirs(stubs_dir, exist_ok=True)
38+
for filename in os.listdir(source_dir):
39+
if filename.endswith('.py'):
40+
source_path = os.path.join(source_dir, filename)
41+
subprocess.run(['stubgen', '-o', stubs_dir, source_path], check=True)
42+
for stub_file in os.listdir(os.path.join(stubs_dir, source_dir)):
43+
if stub_file.endswith('.pyi'):
44+
source_stub_path = os.path.join(stubs_dir, source_dir, stub_file)
45+
if os.path.exists(os.path.join(source_dir, stub_file)):
46+
print(f"Skipped moving {source_stub_path} because {os.path.join(source_dir, stub_file)} already exists!")
47+
else:
48+
shutil.move(source_stub_path, source_dir)
49+
print(f"Moved {source_stub_path} to {source_dir}!")
50+
shutil.rmtree(os.path.join(stubs_dir))
51+
print("Stub files generated and moved successfully.")
5452

5553
with open("README.md", "r") as fh:
5654
print("Using README.md content as `long_description` ...")

0 commit comments

Comments
 (0)