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

Moved type stubs into libtorrent directory #7691

Merged
merged 1 commit into from
Jun 28, 2024
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
72 changes: 36 additions & 36 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -198,42 +198,42 @@ EXTRA_DIST = \
$(DOCS_IMAGES)

PYTHON_FILES= \
CMakeLists.txt \
Jamfile \
client.py \
make_torrent.py \
setup.py \
setup.py.cmake.in \
simple_client.py \
install_data/libtorrent/__init__.pyi \
install_data/libtorrent/py.typed \
src/alert.cpp \
src/boost_python.hpp \
src/bytes.hpp \
src/converters.cpp \
src/create_torrent.cpp \
src/file_storage.cpp \
src/datetime.cpp \
src/entry.cpp \
src/error_code.cpp \
src/fingerprint.cpp \
src/gil.hpp \
src/ip_filter.cpp \
src/load_torrent.cpp \
src/magnet_uri.cpp \
src/module.cpp \
src/optional.hpp \
src/peer_info.cpp \
src/session.cpp \
src/session_settings.cpp \
src/sha1_hash.cpp \
src/sha256_hash.cpp \
src/info_hash.cpp \
src/string.cpp \
src/torrent_handle.cpp \
src/torrent_info.cpp \
src/torrent_status.cpp \
src/utility.cpp \
CMakeLists.txt \
Jamfile \
client.py \
make_torrent.py \
setup.py \
setup.py.cmake.in \
simple_client.py \
libtorrent/__init__.pyi \
libtorrent/py.typed \
src/alert.cpp \
src/boost_python.hpp \
src/bytes.hpp \
src/converters.cpp \
src/create_torrent.cpp \
src/file_storage.cpp \
src/datetime.cpp \
src/entry.cpp \
src/error_code.cpp \
src/fingerprint.cpp \
src/gil.hpp \
src/ip_filter.cpp \
src/load_torrent.cpp \
src/magnet_uri.cpp \
src/module.cpp \
src/optional.hpp \
src/peer_info.cpp \
src/session.cpp \
src/session_settings.cpp \
src/sha1_hash.cpp \
src/sha256_hash.cpp \
src/info_hash.cpp \
src/string.cpp \
src/torrent_handle.cpp \
src/torrent_info.cpp \
src/torrent_status.cpp \
src/utility.cpp \
src/version.cpp

EXAMPLE_FILES= \
Expand Down
1 change: 0 additions & 1 deletion bindings/python/mypy-tox.ini
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
[mypy]
ignore_missing_imports = True
mypy_path = install_data

[mypy-libtorrent]
ignore_missing_imports = False
12 changes: 1 addition & 11 deletions bindings/python/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
import pathlib
import re
import shlex
import shutil
import subprocess
import sys
import sysconfig
Expand Down Expand Up @@ -503,15 +502,6 @@ def find_all_files(path: str) -> Iterator[str]:
yield os.path.join(dirpath, filename)


# Our stubs end up in the "libtorrent" directory in the wheel.
# Setuptools expects it to exist beforehand.
if not os.path.exists("libtorrent"):
os.mkdir("libtorrent")
try:
shutil.copytree("install_data/libtorrent", "libtorrent")
except FileExistsError:
pass

setuptools.setup(
name="libtorrent",
author="Arvid Norberg",
Expand All @@ -526,5 +516,5 @@ def find_all_files(path: str) -> Iterator[str]:
},
distclass=B2Distribution,
packages=["libtorrent"],
package_data={"libtorrent": list(find_all_files("install_data"))},
package_data={"libtorrent": list(find_all_files("libtorrent"))},
)
Loading