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

Various CI fixes #7688

Merged
merged 4 commits into from
Jun 27, 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
4 changes: 2 additions & 2 deletions .github/workflows/linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -352,5 +352,5 @@ jobs:

- name: test-tarball (python bindings)
run: |
cd libtorrent-rasterbar-*/
python3 bindings/python/setup.py build
cd libtorrent-rasterbar-*/bindings/python/
python3 setup.py build
70 changes: 36 additions & 34 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -198,40 +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 \
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 \
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 \
src/version.cpp

EXAMPLE_FILES= \
Expand Down
3 changes: 2 additions & 1 deletion appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ install:
- if not defined ssl_include ( set ssl_include=c:\ )
- if not defined ssl_root_dir ( set ssl_root_dir=c:\ )
- cd %ROOT_DIRECTORY%
- set BOOST_ROOT=c:\Libraries\boost_1_77_0
- set BOOST_ROOT=c:\Libraries\boost_1_83_0
- set BOOST_BUILD_PATH=%BOOST_ROOT%\tools\build
- echo %BOOST_ROOT%
- echo %BOOST_BUILD_PATH%
Expand Down Expand Up @@ -100,6 +100,7 @@ build_script:

test_script:
- cd %ROOT_DIRECTORY%\test
- set PATH=%PATH%;c:\OpenSSL-v111-Win64\bin
- if defined tests (
appveyor-retry b2.exe -l500 --hash openssl-lib=%ssl_lib% openssl-include=%ssl_include% warnings=all warnings-as-errors=on %compiler% address-model=%model% picker-debugging=on invariant-checks=full variant=%variant% link=shared crypto=%crypto% webtorrent=%webtorrent% asserts=on export-extra=on windows-api=%api% windows-version=win10 deterministic-tests
)
Expand Down
1 change: 1 addition & 0 deletions bindings/python/mypy-tox.ini
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
[mypy]
ignore_missing_imports = True
mypy_path = install_data

[mypy-libtorrent]
ignore_missing_imports = False
15 changes: 12 additions & 3 deletions bindings/python/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
import pathlib
import re
import shlex
import shutil
import subprocess
import sys
import sysconfig
Expand Down Expand Up @@ -502,6 +503,15 @@ 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 @@ -515,7 +525,6 @@ def find_all_files(path: str) -> Iterator[str]:
"build_ext": LibtorrentBuildExt,
},
distclass=B2Distribution,
data_files=[
("libtorrent", list(find_all_files("install_data"))),
],
packages=["libtorrent"],
package_data={"libtorrent": list(find_all_files("install_data"))},
)
2 changes: 1 addition & 1 deletion test/setup_transfer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -659,7 +659,7 @@ void wait_for_port(int const port)
}
s.connect(tcp::endpoint(make_address("127.0.0.1")
, std::uint16_t(port)), ec);
if (ec == boost::system::errc::connection_refused)
if (ec)
{
if (i == 100)
{
Expand Down
Loading