merged RC_1_2 into RC_2_0

This commit is contained in:
arvidn
2022-09-08 02:35:27 +02:00
7 changed files with 39 additions and 37 deletions

View File

@ -45,20 +45,20 @@ jobs:
MATRIX_PULL_REQUEST: |
{
"include": [
{"os": "ubuntu-20.04", "CIBW_BUILD": "cp37-manylinux_*", "CIBW_ARCHS": "x86_64"},
{"os": "ubuntu-20.04", "CIBW_BUILD": "cp37-musllinux_*", "CIBW_ARCHS": "x86_64"},
{"os": "macos-10.15", "CIBW_BUILD": "cp37-*", "CIBW_ARCHS": "x86_64"},
{"os": "ubuntu-latest", "CIBW_BUILD": "cp37-manylinux_*", "CIBW_ARCHS": "x86_64"},
{"os": "ubuntu-latest", "CIBW_BUILD": "cp37-musllinux_*", "CIBW_ARCHS": "x86_64"},
{"os": "macos-12", "CIBW_BUILD": "cp37-*", "CIBW_ARCHS": "x86_64"},
{"os": "windows-2019", "CIBW_BUILD": "cp37-*", "CIBW_ARCHS": "AMD64"}
]
}
MATRIX_WORKFLOW_DISPATCH: |
{
"include": [
{"os": "ubuntu-20.04", "CIBW_BUILD": "cp*-manylinux_*", "CIBW_ARCHS": "x86_64"},
{"os": "ubuntu-20.04", "CIBW_BUILD": "cp*-manylinux_*", "CIBW_ARCHS": "aarch64"},
{"os": "ubuntu-20.04", "CIBW_BUILD": "cp*-musllinux_*", "CIBW_ARCHS": "x86_64"},
{"os": "ubuntu-20.04", "CIBW_BUILD": "cp*-musllinux_*", "CIBW_ARCHS": "aarch64"},
{"os": "macos-10.15", "CIBW_BUILD": "cp*", "CIBW_ARCHS": "x86_64"},
{"os": "ubuntu-latest", "CIBW_BUILD": "cp*-manylinux_*", "CIBW_ARCHS": "x86_64"},
{"os": "ubuntu-latest", "CIBW_BUILD": "cp*-manylinux_*", "CIBW_ARCHS": "aarch64"},
{"os": "ubuntu-latest", "CIBW_BUILD": "cp*-musllinux_*", "CIBW_ARCHS": "x86_64"},
{"os": "ubuntu-latest", "CIBW_BUILD": "cp*-musllinux_*", "CIBW_ARCHS": "aarch64"},
{"os": "macos-12", "CIBW_BUILD": "cp*", "CIBW_ARCHS": "x86_64"},
{"os": "windows-2019", "CIBW_BUILD": "cp*", "CIBW_ARCHS": "x86"},
{"os": "windows-2019", "CIBW_BUILD": "cp*", "CIBW_ARCHS": "AMD64"}
]

View File

@ -20,7 +20,7 @@ jobs:
submodules: recursive
- uses: actions/setup-python@v2
with:
python-version: 3.6
python-version: 3.7
- uses: pre-commit/action@v2.0.0
build:

View File

@ -15,7 +15,7 @@ default_language_version:
python: python3
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v3.4.0
rev: v4.3.0
hooks:
#- id: trailing-whitespace
#- id: end-of-file-fixer
@ -32,17 +32,17 @@ repos:
- id: check-symlinks
- id: check-toml
- repo: https://github.com/pappasam/toml-sort
rev: v0.19.0
rev: v0.20.1
hooks:
- id: toml-sort
args: [--all, --in-place]
- repo: https://github.com/pre-commit/pygrep-hooks
rev: v1.7.0
rev: v1.9.0
hooks:
- id: rst-directive-colons
- id: rst-inline-touching-normal
- repo: https://github.com/PyCQA/isort
rev: 5.7.0
rev: 5.10.1
hooks:
- id: isort
exclude: |
@ -74,7 +74,7 @@ repos:
tools/update_copyright.py
)$
- repo: https://github.com/myint/autoflake
rev: v1.4
rev: v1.5.3
hooks:
- id: autoflake
args: [--in-place, --remove-unused-variables, --remove-all-unused-imports, --remove-duplicate-keys]
@ -89,7 +89,7 @@ repos:
tools/libtorrent_lldb.py
)
- repo: https://github.com/python/black
rev: 20.8b1
rev: 22.8.0
hooks:
- id: black
# Avoiding PR bloat
@ -137,7 +137,7 @@ repos:
name: black (pyi)
types: [pyi]
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v0.800
rev: v0.971
hooks:
- id: mypy
# Avoiding PR bloat
@ -178,7 +178,7 @@ repos:
tools/update_copyright.py
)$
- repo: https://gitlab.com/pycqa/flake8.git
rev: 3.8.4
rev: 3.9.2
hooks:
- id: flake8
exclude: |

View File

@ -129,6 +129,8 @@
* added support for GnuTLS for HTTPS and torrents over SSL
* fix wanted_done/done accounting when force-rechecking
* expose userdata via torrent_handle (back-port from 2.0)
* fix renaming of filenames that are too long for the filesystem
* made UPnP and LSD code avoid using select_reactor (to work around an issue on windows in boost.asio < 1.80)

View File

@ -44,13 +44,13 @@ install:
- echo %BOOST_ROOT%
- echo %BOOST_BUILD_PATH%
- set PATH=%PATH%;%BOOST_BUILD_PATH%
- ps: '"using msvc : 14.1 ;`nusing gcc ;`nusing python : 3.6 : c:\\Python36-x64 : c:\\Python36-x64\\include : c:\\Python36-x64\\libs ;`n" | Set-Content $env:HOMEDRIVE\$env:HOMEPATH\user-config.jam'
- ps: '"using msvc : 14.1 ;`nusing gcc ;`nusing python : 3.7 : c:\\Python37-x64 : c:\\Python37-x64\\include : c:\\Python37-x64\\libs ;`n" | Set-Content $env:HOMEDRIVE\$env:HOMEPATH\user-config.jam'
- type %HOMEDRIVE%%HOMEPATH%\user-config.jam
- cd %ROOT_DIRECTORY%
- set PATH=c:\msys64\mingw32\bin;%PATH%
- g++ --version
- set PATH=c:\Python36-x64;%PATH%
- set PYTHON_INTERPRETER=c:\Python36-x64\python.exe
- set PATH=c:\Python37-x64;%PATH%
- set PYTHON_INTERPRETER=c:\Python37-x64\python.exe
- python --version
- echo %ROOT_DIRECTORY%
- cd %BOOST_BUILD_PATH%
@ -80,7 +80,7 @@ build_script:
b2.exe --hash openssl-lib=%ssl_lib% openssl-include=%ssl_include% warnings=all %compiler% address-model=%model% picker-debugging=on invariant-checks=full variant=%variant% link=shared crypto=%crypto% asserts=on export-extra=on windows-api=%api% windows-version=win10 libtorrent-link=shared stage_module stage_dependencies
)
- if defined python_dist (
c:\Python36-x64\python.exe setup.py bdist --format=msi
c:\Python37-x64\python.exe setup.py bdist --format=msi
)
# minimal support for cmake build

View File

@ -5,8 +5,8 @@ cmake_minimum_required(VERSION 3.17.0 FATAL_ERROR) # Configurable policies: <= C
# The code below assumes default boost installation, when the module for python 3 is named 'python3'.
# To customize that one can provide a name for the Boost::python module via
# 'boost-python-module-name' variable when invoking cmake.
# E.g. on Gentoo with python 3.6 and Boost::python library name 'libboost_python-3.6.so'
# the parameter would be -Dboost-python-module-name="python-3.6".
# E.g. on Gentoo with python 3.7 and Boost::python library name 'libboost_python-3.7.so'
# the parameter would be -Dboost-python-module-name="python-3.7".
# The extension module and the cpython executable have to use the same C runtime library. On Windows
# Python is compiled with MSVC and we will test MSVC version to make sure that it is the same for
@ -19,7 +19,7 @@ cmake_minimum_required(VERSION 3.17.0 FATAL_ERROR) # Configurable policies: <= C
# See https://devguide.python.org/#status-of-python-branches for supported python versions
function(_get_compatible_python_versions _ret)
if(CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 19 AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS 20)
list(APPEND _tmp 3.6 3.7 3.8 3.9)
list(APPEND _tmp 3.6 3.7 3.8 3.9 3.10)
endif()
set(${_ret} ${_tmp} PARENT_SCOPE)
endfunction()
@ -37,7 +37,7 @@ if (CMAKE_CXX_COMPILER_ID MATCHES "MSVC" AND NOT skip-python-runtime-test)
endif()
endif()
set(boost-python-module-name "python${Python3_VERSION_MAJOR}${Python3_VERSION_MINOR}" CACHE STRING "Boost::python module name, e.g. 'python-3.6'")
set(boost-python-module-name "python${Python3_VERSION_MAJOR}${Python3_VERSION_MINOR}" CACHE STRING "Boost::python module name, e.g. 'python-3.7'")
find_package(Boost REQUIRED COMPONENTS ${boost-python-module-name})

View File

@ -30,7 +30,7 @@ install the build prerequisites on your system:
boost libraries and ``b2``, and your building toolchain (``gcc``, visual
studio, etc).
2. Boost.Python, if not otherwise included in your boost installation
3. Python 3.6+. Older versions may work, but are not tested.
3. Python 3.7+. Older versions may work, but are not tested.
.. __: building.html
@ -71,8 +71,8 @@ build for a different python version
``setup.py`` will target the running interpreter. To build for different python
versions, you must change how you invoke ``setup.py``::
# build for python3.6
python3.6 setup.py build
# build for python3.7
python3.7 setup.py build
# build for python3.7
python3.7 setup.py build
@ -111,16 +111,16 @@ installation.
``b2`` has some auto-detection capabilities. You may be able to do just this::
using python : 3.6 ;
using python : 3.7 ;
However you may need to specify full paths. On windows, it make look like
this::
using python : 3.6 : C:/Users/<UserName>/AppData/Local/Programs/Python/Python36 : C:/Users/<UserName>/AppData/Local/Programs/Python/Python36/include : C:/Users/<UserName>/AppData/Local/Programs/Python/Python36/libs ;
using python : 3.7 : C:/Users/<UserName>/AppData/Local/Programs/Python/Python36 : C:/Users/<UserName>/AppData/Local/Programs/Python/Python36/include : C:/Users/<UserName>/AppData/Local/Programs/Python/Python36/libs ;
Or on Linux, like this::
using python : 3.6 : /usr/bin/python3.6 : /usr/include/python3.6 : /usr/lib/python3.6 ;
using python : 3.7 : /usr/bin/python3.7 : /usr/include/python3.7 : /usr/lib/python3.7 ;
Note that ``b2``'s python path detection is known to only work for global
python installations. It is known to be broken for virtualenvs or ``pyenv``. If
@ -133,7 +133,7 @@ invoking b2
Build the bindings like so::
cd bindings/python
b2 release python=3.6 address-model=64
b2 release python=3.7 address-model=64
Note that ``address-model`` should match the python installation you are
building for.
@ -161,14 +161,14 @@ root directory of the boost source distribution.
For example, to build a self-contained python module::
b2 release python=3.6 libtorrent-link=static boost-link=static
b2 release python=3.7 libtorrent-link=static boost-link=static
helper targets
--------------
There are some targets for placing the build artifact in a helpful location::
$ b2 release python=3.6 stage_module stage_dependencies
$ b2 release python=3.7 stage_module stage_dependencies
This will produce a ``libtorrent`` python module in the current directory (file
name extension depends on operating system). The libraries the python module depends
@ -176,18 +176,18 @@ on will be copied into ``./dependencies``.
To install the python module, build it with the following command::
b2 release python=3.6 install_module
b2 release python=3.7 install_module
By default the module will be installed to the python user site. This can be
changed with the ``python-install-scope`` feature. The valid values are ``user``
(default) and ``system``. e.g.::
b2 release python=3.6 install_module python-install-scope=system
b2 release python=3.7 install_module python-install-scope=system
To specify a custom installation path for the python module, specify the desired
path with the ``python-install-path`` feature. e.g.::
b2 release python=3.6 install_module python-install-path=/home/foobar/python-site/
b2 release python=3.7 install_module python-install-path=/home/foobar/python-site/
using libtorrent in python
==========================