Commit Graph

118 Commits

Author SHA1 Message Date
messense 9199c78e1b Update build.rs
Co-authored-by: David Hewitt <1939362+davidhewitt@users.noreply.github.com>
2021-03-12 16:56:14 +08:00
messense 884cd9d726 Apply suggestion from code review
Co-authored-by: kngwyu <yuji.kngw.80s.revive@gmail.com>
2021-03-12 16:56:14 +08:00
messense b9a2c64157 Use _PYTHON_SYSCONFIGDATA_NAME in find_sysconfigdata when cross-compiling 2021-03-12 16:56:14 +08:00
Yuji Kanagawa 6f8f958f34
Apply suggestions from code review
Co-authored-by: David Hewitt <1939362+davidhewitt@users.noreply.github.com>
2021-03-06 18:03:17 +09:00
kngwyu 4ec78e6b18 Warning when 'abi3' is used with PyPy 2021-03-06 12:52:32 +09:00
kngwyu 89f555f506 Refactor Python scripts in build.rs 2021-02-20 18:41:04 +09:00
messense ebc52c4aea Don't require PYO3_CROSS_LIB_DIR when compiling for x86_64 from macOS arm64 and reverse 2021-02-14 16:43:50 +08:00
Christoph Reiter e067b32521 Support building with Mingw Python
The DLL of the mingw Python in MSYS2 is named libpython3.8.dll:

$ python3 -m sysconfig | grep LIBPYTHON
        LIBPYTHON = "-lpython3.8"

Add another special case to in get_rustc_link_lib() to handle that case.
Afaik the mingw build doesn't support the limited ABI, so skipt that as well.

This makes all tests pass in an MSYS2 environment and lets us build
python-cryptography.
2021-02-12 12:31:20 +00:00
David Hewitt 59dac57689 build: fix support for non-utf8 systems 2021-01-26 23:16:47 +00:00
konstin c8b290a254 build: make abi3 linking work on windows 2021-01-10 10:13:49 +00:00
David Hewitt b152fd6317
Merge pull request #1359 from dalcde/patch-2
Let pyconfig.h not define Py_ENABLE_SHARED
2021-01-05 22:22:50 +00:00
Dexter Chua 8f404c4db5
Let pyconfig.h not define Py_ENABLE_SHARED
If there is no line that defines Py_ENABLE_SHARED in `pyconfig.h`, then it is false
2021-01-04 22:24:39 +08:00
David Hewitt 59707f0b81 auto-initialize: new feature to control initializing Python 2021-01-02 16:08:10 +00:00
David Hewitt a317e0df74 build: use BuildFlags struct 2021-01-01 07:34:36 +00:00
David Hewitt a350dd2c20 build: make include dir optional when targeting Windows 2020-12-31 22:02:29 +00:00
David Hewitt cc6fc483a6 build: remove unused unicode flags 2020-12-31 22:02:29 +00:00
David Hewitt 6fdcfdebe1 build: simplify build script 2020-12-31 22:02:29 +00:00
cecini c780aa931d Fix the pydebug with trace refs and count_allocs for python > 3.7 2020-12-23 16:20:19 +00:00
Yuji Kanagawa 9aa70f7c89
Merge pull request #1263 from PyO3/abi3-min-python
Add abi3-py* features
2020-12-08 12:52:00 +09:00
kngwyu 49143724d5 Rename PYO3_NO_INTERPRETER by PYO3_NO_PYTHON 2020-12-07 17:30:04 +09:00
kngwyu 1b838504b7 Introduce PYO3_NO_INTERPRETER variable for build script 2020-12-01 23:40:49 +09:00
David Hewitt 53ce423424 anaconda: fix for building in a virtualenv 2020-11-21 08:56:07 +00:00
kngwyu 597119d40a Add abi3-py* features 2020-11-16 00:39:54 +09:00
David Hewitt 9617edfca9 msrv: bump to 1.45 2020-11-12 11:33:08 +00:00
David Hewitt cfa586c034 build: not cross-compiling when musl from gnu 2020-11-10 08:31:39 +00:00
Yuji Kanagawa 3b3ba4e3ab
Merge pull request #1152 from PyO3/abi3
Complete abi3 support
2020-10-27 23:30:36 +09:00
David Hewitt b4b5f2323c
build.rs: use inclusive range syntax 2020-10-20 08:53:28 +01:00
Alex Gaynor 90a825d0c2 Merge branch 'master' into abi3-merge-master 2020-10-19 14:32:49 -04:00
David Hewitt afd9b823d2 Drop support for Python 3.5 2020-10-18 19:02:27 +01:00
Alex Gaynor 9e34835b76 Merge branch 'master' into abi3-merge-master 2020-10-12 18:03:14 -04:00
kngwyu 41cfa6b2e9 Don't watch PYTHON_SYS_EXECUTABLE and PATH when unnecessary 2020-10-12 23:22:14 +09:00
Alex Gaynor 140790b15f Merge branch 'master' into abi3-merge-master 2020-10-10 10:11:49 -04:00
Alex Gaynor d8c8c1760e Link python3.lib instead of python3x.lib on Windows in abi3 mode 2020-09-23 08:32:30 -04:00
kngwyu c07e1aa40a Use abi3 feature, instead of unstable-api 2020-09-20 00:06:14 +09:00
Alex Gaynor 62ad53f9fc
Don't consider it cross-compilation when building for 32-bit Windows on 64-bit windows 2020-09-12 19:10:02 -04:00
Rob Thatcher b66a92579c treat Anaconda python as shared 2020-09-11 16:58:33 +01:00
kngwyu 1941f4daef Rename all-apis with unstable-api 2020-09-06 17:37:55 +09:00
kngwyu d2a10b688f Introduce all-apis feature to support abi3 2020-09-05 17:52:41 +09:00
David Hewitt 3fa1639b8c Fix cross-compilation from unix to windows 2020-08-29 11:37:49 +01:00
Rene Leveille 441d7f52b1 apply symlink use case, change variable name 2020-08-19 12:11:14 -04:00
Rene Leveille 455ec80a98 make clippy happy 2020-08-18 22:14:14 -04:00
Rene Leveille 7beb272075 find within general lib dir, with new optional env variable 2020-08-18 22:05:29 -04:00
Rene Leveille 6ddae70a2b fix changelog and added comment for finding sysconfigdata 2020-08-18 13:23:48 -04:00
Rene Leveille 5dc907bc5d apply suggestions from review 2020-08-17 18:14:05 -04:00
Rene Leveille 695be35289 make clippy happy 2020-08-17 15:23:24 -04:00
Rene Leveille afac788c1c fix complexity of finding and parsing 2020-08-17 15:12:12 -04:00
Rene Leveille aef159d4ee appy suggestions from PR 2020-08-17 11:26:30 -04:00
Rene Leveille 3bc951a551 make clippy happy and add to changelog 2020-08-17 11:25:42 -04:00
Rene Leveille e4edc6cdd7 Load compilation options from _sysconfigdata_*.py file
Following the discussion in #1077 this change allows the compilation
script to load the configurations from a _sysconfigdata_ file
in the library directory.

This file is also provided on target systems in the same directory.
At least on Manjaro Linux.
Which could remove the need to run a python script at compile time
for compiling the the host.

I've also addressed the linking need for android in #1082.
2020-08-17 11:25:06 -04:00
David Hewitt 7fe989693c Move fmt and clippy to actions 2020-08-09 12:15:54 +01:00