-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix building on the main branch (#89)
- Loading branch information
Showing
6 changed files
with
88 additions
and
105 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,40 @@ | ||
[build-system] | ||
requires = ["cffi", "setuptools", "urllib3>=2.0.2", "wheel"] | ||
requires = ["cffi", "setuptools", "urllib3", "wheel"] | ||
build-backend = "setuptools.build_meta" | ||
|
||
[project] | ||
name = "ada-url" | ||
version = "1.14.0" | ||
authors = [ | ||
{name = "Bo Bayles", email = "[email protected]"}, | ||
] | ||
description = 'URL parser and manipulator based on the WHAT WG URL standard' | ||
readme = "README.rst" | ||
requires-python = ">=3.8" | ||
license = {text = "Apache 2.0"} | ||
classifiers = [ | ||
"License :: OSI Approved :: Apache Software License", | ||
"Programming Language :: Python :: 3", | ||
"Programming Language :: Python :: 3 :: Only", | ||
] | ||
dependencies = [ | ||
"cffi", | ||
] | ||
|
||
[project.urls] | ||
Homepage = "https://www.ada-url.com/" | ||
Documentation = "https://ada-url.readthedocs.io" | ||
Repository = "https://github.com/ada-url/ada-python" | ||
|
||
[tool.setuptools.packages.find] | ||
exclude = ["tests"] | ||
|
||
[tool.setuptools] | ||
include-package-data = true | ||
|
||
[tool.setuptools.package-data] | ||
ada_url = ["*.c", "*.h", "*.o"] | ||
|
||
[tool.black] | ||
line-length = 88 | ||
target-version = ['py38'] | ||
|
@@ -22,6 +55,11 @@ quote-style = "single" | |
select = ["E", "F"] | ||
ignore = ["E501"] | ||
|
||
[tool.coverage.run] | ||
include = [ | ||
"ada_url/**", | ||
] | ||
|
||
[tool.cibuildwheel] | ||
build = [ | ||
"cp38-*", | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,58 +1,10 @@ | ||
# What we want | ||
build==1.2.1 | ||
coverage==7.4.3 | ||
ruff==0.3.7 | ||
setuptools==69.5.1 | ||
Sphinx==7.1.2 | ||
twine==5.1.0 | ||
wheel==0.43.0 | ||
|
||
# What we need | ||
alabaster==0.7.13;python_version<"3.9" | ||
alabaster==0.7.16;python_version>="3.9" | ||
Babel==2.14.0 | ||
backports.tarfile==1.0.0 | ||
certifi==2024.2.2 | ||
charset-normalizer==3.3.2 | ||
docutils==0.20.1 | ||
idna==3.7 | ||
imagesize==1.4.1 | ||
importlib_metadata==7.1.0 | ||
importlib_resources==6.4.0 | ||
jaraco.classes==3.4.0 | ||
jaraco.context==5.3.0 | ||
jaraco.functools==4.0.1 | ||
Jinja2==3.1.3 | ||
keyring==25.2.0 | ||
markdown-it-py==3.0.0 | ||
MarkupSafe==2.1.5 | ||
mdurl==0.1.2 | ||
more-itertools==10.2.0 | ||
nh3==0.2.17 | ||
packaging==24.0 | ||
pkginfo==1.11.0 | ||
Pygments==2.17.2 | ||
pyproject_hooks==1.0.0 | ||
pytz==2024.1 | ||
readme_renderer==43.0 | ||
requests==2.31.0 | ||
requests-toolbelt==1.0.0 | ||
rfc3986==2.0.0 | ||
rich==13.7.1 | ||
snowballstemmer==2.2.0 | ||
sphinxcontrib-applehelp==1.0.4;python_version<"3.9" | ||
sphinxcontrib-applehelp==1.0.8;python_version>="3.9" | ||
sphinxcontrib-devhelp==1.0.2;python_version<"3.9" | ||
sphinxcontrib-devhelp==1.0.6;python_version>="3.9" | ||
sphinxcontrib-htmlhelp==2.0.1;python_version<"3.9" | ||
sphinxcontrib-htmlhelp==2.0.5;python_version>="3.9" | ||
sphinxcontrib-jsmath==1.0.1 | ||
sphinxcontrib-qthelp==1.0.3 | ||
sphinxcontrib-serializinghtml==1.1.5;python_version<"3.9" | ||
sphinxcontrib-serializinghtml==1.1.10;python_version>="3.9" | ||
tomli==2.0.1 | ||
typing_extensions==4.11.0 | ||
urllib3==2.2.1 | ||
zipp==3.18.1 | ||
build | ||
coverage | ||
ruff | ||
setuptools | ||
Sphinx | ||
twine | ||
urllib3 | ||
wheel | ||
|
||
-r base.txt |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
""" | ||
update_sdist.py | ||
Run this script to remove compiled artifacts from source distribution tarballs. | ||
""" | ||
from pathlib import Path | ||
from tarfile import open as tar_open | ||
from tempfile import TemporaryDirectory | ||
|
||
REMOVE_FILES = frozenset(['ada_url/ada.o']) | ||
|
||
|
||
def update_archive(file_path, removals): | ||
with TemporaryDirectory() as temp_dir: | ||
with tar_open(file_path, mode='r:gz') as tf: | ||
tf.extractall(temp_dir) | ||
|
||
dir_path = next(Path(temp_dir).glob('ada_url-*')) | ||
all_files = [] | ||
for file_path in Path(temp_dir).glob('**/*'): | ||
if file_path.is_dir(): | ||
continue | ||
if str(file_path.relative_to(dir_path)) in REMOVE_FILES: | ||
continue | ||
all_files.append(file_path) | ||
|
||
with tar_open(file_path, mode='w:gz') as tf: | ||
for file_path in all_files: | ||
arcname = file_path.relative_to(temp_dir) | ||
print(arcname) | ||
tf.add(file_path, arcname=arcname) | ||
|
||
|
||
if __name__ == '__main__': | ||
for file_path in Path().glob('dist/*.tar.gz'): | ||
update_archive(file_path, REMOVE_FILES) | ||
print(f'Updated {file_path}') |