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

Better integration of setup.py to invoke b2 #5325

Merged
merged 1 commit into from
Dec 20, 2020
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
44 changes: 44 additions & 0 deletions .github/workflows/python.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: Python bindings
on: [push, pull_request]

jobs:
build:
name: build
runs-on: ${{ matrix.os }}

strategy:
matrix:
os: [ubuntu-20.04, macos-latest]

steps:
- uses: actions/checkout@v2
with:
submodules: recursive

- name: dependencies (macos)
if: runner.os == 'macOS'
run: |
brew install boost-build boost boost-python3 [email protected]

- name: update package lists
if: runner.os == 'Linux'
run: |
sudo apt update

- name: dependencies (linux)
if: runner.os == 'Linux'
run: |
sudo apt install libboost-tools-dev libboost-python-dev libboost-dev libboost-system-dev python3 python3-setuptools
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you should probably rebase now that #5749 landed, as well as add those sudo apt update here as well


- name: build/install
run: |
cd bindings/python
# Homebrew's python "framework" sets a prefix via distutils config.
# --prefix conflicts with --user, so null out prefix so we have one
# command that works everywhere
python3 setup.py build_ext -j3 --libtorrent-link=static install --user --prefix=

- name: tests
run: |
cd bindings/python
python3 test.py
10 changes: 0 additions & 10 deletions bindings/python/Jamfile
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ use-project /torrent : ../.. ;

BOOST_ROOT = [ modules.peek : BOOST_ROOT ] ;
# this is used to make bjam use the same version of python which is executing setup.py
LIBTORRENT_PYTHON_INTERPRETER = [ modules.peek : LIBTORRENT_PYTHON_INTERPRETER ] ;

feature lt-visibility : default hidden : composite propagated ;
feature.compose <lt-visibility>hidden : <cflags>-fvisibility=hidden <cxxflags>-fvisibility-inlines-hidden ;
Expand All @@ -27,15 +26,6 @@ feature python-install-path : : free path ;
# the python module in the system directory or user-specifc directory
feature python-install-scope : user system : ;

# this is just to force boost build to pick the desired python target when using LIBTORRENT_PYTHON_INTERPRETER
feature libtorrent-python : on ;

if $(LIBTORRENT_PYTHON_INTERPRETER)
{
echo "using python interpreter at: " $(LIBTORRENT_PYTHON_INTERPRETER) ;
using python : : "$(LIBTORRENT_PYTHON_INTERPRETER)" : : : <libtorrent-python>on ;
}

# copied from boost 1.63's boost python jamfile
rule find-py3-version
{
Expand Down
Loading