51 Commits

Author SHA1 Message Date
Yotam Nachum ddcfbcf25d setup: Move setuptools requirment to pyproject.toml
PEP 517 specify a new format for build systems and PEP 518 specify how
we should require packages for our build system. Setuptools support PEP
517 so we should use it that way.
2023-01-14 15:15:59 +02:00
Yotam Nachum b203e4bbca core: Add specific signals type hinting 2023-01-14 15:15:17 +02:00
Ole André Vadla Ravnås a9de87367d setup: Assume non-universal devkit build on macOS
The setuptools build system typically builds a universal binary, but
that requires downloading multiple devkits and combining them. The user
may still elect to do that by setting _PYTHON_HOST_PLATFORM, but by
default we assume that a non-universal build is desired.
2022-10-08 12:48:13 +02:00
Ole André Vadla Ravnås 2d933bc368 setup: Fix computed sdist version metadata
By reviving our old logic that extracted it from PKG-INFO.
2022-10-08 12:10:56 +02:00
Ole André Vadla Ravnås 457c4ab417 extension: Add support for building from source
So we can support environments for which wheels cannot be uploaded to
PyPI, such as Termux on Android.
2022-10-06 22:50:50 +02:00
Ole André Vadla Ravnås f8ba250318 setup: Move from codecs.open() to open() 2022-10-06 22:50:50 +02:00
Ole André Vadla Ravnås acafa09a82 Tell setuptools that we are using the limited API 2022-10-06 22:50:50 +02:00
Yotam Nachum 64b4b85298 Add _frida stub file to package data 2022-09-24 19:02:17 +03:00
Yotam Nachum 4f5c83fd09 Fix type hinting 2022-09-24 18:54:10 +03:00
Orip 2c805431bd Remove PEP503 parser and egg downloader from setup.py 2022-09-21 20:20:26 +02:00
Yotam Nachum 600d68a982 Add _frida type hinting 2022-09-12 20:59:52 +03:00
Yotam Nachum 057d901c06 Add type hinting
Lots of functions were using *args and **kwargs that were kind of
useless with type hinting, so I explicitly named every possible argument
and its type. It breaks backward compatibility (sort of) because you can
pass nonsense arguments anymore.
2022-09-12 20:59:52 +03:00
Yotam Nachum fc00ac2b75 Automatically format code with Black and Isort 2022-09-12 20:59:52 +03:00
Yotam Nachum c4785c3f7c Use f-strings
f-strings is a new, shorter alternative to `.format` method that was
introduced in Python 3.6.
2022-09-12 20:59:52 +03:00
Yotam Nachum 8f5cca32f4 Remove string format specifiers 2022-09-12 20:59:52 +03:00
Yotam Nachum 8491ee563b Remove handling of Python 2 from setup.py 2022-09-12 20:59:52 +03:00
Yotam Nachum b8ced413df Remove unicode prefix from strings 2022-09-12 20:59:51 +03:00
Yotam Nachum bb8cb7ae7d Remove Python 2 imports fallback 2022-09-12 20:21:45 +03:00
Yotam Nachum 27337a5ce5 Remove unused backward compatibility header 2022-09-12 11:55:00 +03:00
Yotam Nachum 2ff04ba3ea Remove Python 2 from supported versions
Python 2 was EOL over two years ago so we should stop supporting it.
Python 3.4 to 3.6 is EOL as well so there is no reason in keeping it as
well. Python 3.9 and 3.10 are new versions that we should support
2022-08-06 17:04:26 +03:00
Ole André Vadla Ravnås 0fedbe59e8 setup: Use platform's path separator in computed egg_path
To avoid it looking confusing on Windows.
2022-05-03 21:31:39 +02:00
汉广 a6d23a72d4 setup: Fix index URL retrieval on Python < 3.6 (#204) 2022-05-03 21:29:26 +02:00
X5tar dd89460c3d setup: Fix get_index_url_from_pip() (#197) 2022-02-24 07:32:27 +01:00
GalaxySnail a2b73925ff setup: Add a slash after index URL (#194) 2022-02-10 07:37:04 +01:00
Ole André Vadla Ravnås dfd5aec7b0 setup: Fix the local .egg logic 2022-02-03 20:32:35 +01:00
Ole André Vadla Ravnås ee526d07ac setup: Make environment variables optional
To make it easier to use in tests.
2022-01-25 11:19:39 +01:00
Ole André Vadla Ravnås 0e60fb8675 setup: Remove unused variable 2022-01-25 11:19:00 +01:00
Ole André Vadla Ravnås d8bb49ab87 setup: Fix Windows .pyd patching logic for Python >= 3.10
By making sure our binaries are linked against a Python DLL with three
version digits, so we have enough space. We simply pad with a NUL-byte
for runtimes with only two version digits in the DLL name, as the string
is NUL-terminated.
2022-01-24 23:52:09 +01:00
Ole André Vadla Ravnås a670dce90e setup: Fix a minor inconsistency 2022-01-24 23:43:30 +01:00
Ole André Vadla Ravnås 008c992160 setup: Add support for FreeBSD 2022-01-24 14:33:58 +01:00
Ole André Vadla Ravnås 295b57a1ba setup: Improve error-handling 2022-01-24 14:33:58 +01:00
GalaxySnail 86358c948c setup: Use PEP 503 instead of PyPI xmlrpc (#188)
To support mirrors.

Fixes #141.
2022-01-24 14:33:55 +01:00
Ole André Vadla Ravnås 14a664c906 Add setup.py download logic for Android/ARM 2021-10-25 18:33:00 +02:00
Ole André Vadla Ravnås 8fe7c4a1d1 Explicitly depend on setuptools
Instead of assuming it's already present.
2021-04-15 11:43:46 +02:00
Ole André Vadla Ravnås 384fc31401 Declare that we are not zip-safe
As this doesn't work on Android.
2021-02-02 23:53:35 +01:00
Ole André Vadla Ravnås 45a822afa5 Fix setup.py download logic on Android 2021-02-02 23:52:13 +01:00
Ole André Vadla Ravnås e399c2a3ef Update website URL in setup.py 2021-02-02 23:50:44 +01:00
Ole André Vadla Ravnås 68f3b6d44a Explicitly declare Python 3.8 as supported 2020-08-04 20:39:34 +02:00
Ole André Vadla Ravnås 2a757595e9 Update setup.py to support macOS on Apple Silicon 2020-07-19 16:35:14 +02:00
Ole André Vadla Ravnås 413beb9ec8 Fix the macOS download logic for Python 3.x 2020-05-16 01:30:45 +02:00
Ole André Vadla Ravnås 0dbf400ab5 Fix grammar in setup.py log message 2020-02-28 06:29:08 +01:00
DengChao 581111cd07 Look for a local .egg before hitting the network
To speed things up in situations where the network path is expected to
fail.
2020-02-28 05:53:46 +01:00
DengChao 90992cbf39 Add 2 minute timeout to the .egg download in setup.py
Script may otherwise get stuck.
2020-02-28 05:35:46 +01:00
DengChao 3c872b6744 Improve style of setup.py 2020-02-28 05:26:39 +01:00
Ole André Vadla Ravnås 9671514a8b Patch extension DLL to match Python on Windows
So we can support any 3.x version like on the other platforms.

The Python 3.x ABI is stable so there is no need to build an extension
for each minor version. Due to the limited dynamic linking support on
Windows, however, there's no way around hard-coding the Python DLL name
in the extension it is compiled for.

As we don't expect users to install via easy_install on Python 3.x, but
assume they're using pip, we just have to tweak our setup.py so it fixes
up the extension after grabbing it from the .egg.
2019-12-18 04:32:22 +01:00
Ole André Vadla Ravnås 7d5c36e358 Make the Linux pip setup logic architecture agnostic
At least in theory.
2019-05-07 02:41:39 +02:00
Ole André Vadla Ravnås 5c2dc4da55 Fix setup.py OS version logic on macOS
Now that we no longer release redundant prebuilds for macOS.

Kudos to @Ronophobia for discovering this issue.
2018-11-06 22:19:32 +01:00
Ole André Vadla Ravnås 1b4b59fdca Declare support for Python 3.7 2018-08-20 23:26:19 +02:00
Ole André Vadla Ravnås d599cdd7a5 Fix long description
We were reading in the wrong README.
2018-07-11 19:52:04 +02:00
Ole André Vadla Ravnås ac2357700f Fix setup.py README logic
To allow unicode characters in the README.
2018-07-11 16:57:09 +02:00