Skip to content

Commit

Permalink
Merge pull request #949 from koordinates/rc-wheel-fixes
Browse files Browse the repository at this point in the history
Various wheel/python fixes
  • Loading branch information
olsen232 committed Nov 23, 2023
2 parents 1f3e0b9 + 1b3940b commit 48648aa
Show file tree
Hide file tree
Showing 8 changed files with 30 additions and 45 deletions.
7 changes: 5 additions & 2 deletions requirements/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@
Kart uses [pip-tools](https://pip-tools.readthedocs.io/en/latest/) to manage
Python dependencies for releases, test, and development.



### To update the requirements

1. do a CMake+VCPKG build
Expand All @@ -19,3 +17,8 @@ Python dependencies for releases, test, and development.
2. `cmake --build build --target py-requirements-upgrade`
3. run `cmake --build build` to install the new dependencies
4. check & commit the changes to `requirements/*.txt`

### `vendor-wheels.txt`

Update versions here to match the package versions we're building in
[`vcpkg-vendor/CMakeLists.txt`](../vcpkg-vendor/CMakeLists.txt).
6 changes: 4 additions & 2 deletions requirements/dev.txt
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
#
# This file is autogenerated by pip-compile with Python 3.11
# This file is autogenerated by pip-compile with Python 3.12
# by the following command:
#
# "cmake --build build --target py-requirements"
#
appnope==0.1.3
# via -r dev.in
# via
# -r dev.in
# ipython
asttokens==2.2.1
# via stack-data
backcall==0.2.0
Expand Down
2 changes: 1 addition & 1 deletion requirements/docs.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#
# This file is autogenerated by pip-compile with Python 3.11
# This file is autogenerated by pip-compile with Python 3.12
# by the following command:
#
# "cmake --build build --target py-requirements"
Expand Down
10 changes: 1 addition & 9 deletions requirements/requirements.in
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
boto3
boto3>=1.29.1
certifi
click~=8.1
docutils<0.18
Expand All @@ -15,11 +15,3 @@ jsonschema>=4.3
# and they're removed by CMake from the final requirements.txt files.
# versions come from vcpkg-vendor/CMakeLists.txt
-r vendor-wheels.txt

# SQLAlchemy on Windows
# FIXME: the constraint seems to be dropped during pip-compile
greenlet; os_name!="posix"

# workaround weird import error with pyinstaller
# https://github.com/pypa/setuptools/issues/1963#issuecomment-656811086
#setuptools~=49.1.1
20 changes: 9 additions & 11 deletions requirements/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,37 +1,35 @@
#
# This file is autogenerated by pip-compile with Python 3.11
# This file is autogenerated by pip-compile with Python 3.12
# by the following command:
#
# "cmake --build build --target py-requirements"
#
attrs==22.1.0
# via jsonschema
boto3==1.28.42
boto3==1.29.6
# via -r requirements.in
botocore==1.31.42
botocore==1.32.6
# via
# boto3
# s3transfer
certifi==2022.12.7
# via -r requirements.in
#cffi==1.15.1
#cffi==1.16.0
# via
# -r vendor-wheels.txt
# cryptography
# pygit2
# reflink
click==8.1.4
# via -r requirements.in
#cryptography==41.0.3
#cryptography==41.0.4
# via -r vendor-wheels.txt
docutils==0.17.1
# via
# -r requirements.in
# rst2txt
#gdal==3.6.3
#gdal==3.8.0
# via -r vendor-wheels.txt
greenlet==3.0.1
# via sqlalchemy
jmespath==1.0.1
# via
# boto3
Expand All @@ -44,7 +42,7 @@ msgpack==0.6.2
# via -r vendor-wheels.txt
pycparser==2.21
# via cffi
#pygit2==1.9.0
#pygit2==1.12.1
# via -r vendor-wheels.txt
pygments==2.13.0
# via
Expand All @@ -60,11 +58,11 @@ pyrsistent==0.19.2
# via -r vendor-wheels.txt
python-dateutil==2.8.2
# via botocore
#reflink==0.2.1
#reflink==0.2.2
# via -r vendor-wheels.txt
rst2txt==1.1.0
# via -r requirements.in
s3transfer==0.6.2
s3transfer==0.7.0
# via boto3
shellingham==1.5.0
# via -r requirements.in
Expand Down
2 changes: 1 addition & 1 deletion requirements/test.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#
# This file is autogenerated by pip-compile with Python 3.11
# This file is autogenerated by pip-compile with Python 3.12
# by the following command:
#
# "cmake --build build --target py-requirements"
Expand Down
8 changes: 4 additions & 4 deletions requirements/vendor-wheels.txt
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
cffi==1.15.1
cffi==1.16.0
cryptography==41.0.4
gdal==3.6.3
gdal==3.8.0
psycopg2==2.9.9
pygit2==1.9.0
pygit2==1.12.1
pyodbc==5.0.1
pysqlite3==0.5.2
reflink==0.2.1
reflink==0.2.2
20 changes: 5 additions & 15 deletions vcpkg-vendor/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -361,17 +361,7 @@ find_package(OpenSSL REQUIRED)
find_package(Rust 1.41 REQUIRED)
cmake_path(GET RUST_EXECUTABLE PARENT_PATH RUST_DIR)

file(
GENERATE
OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/cryptography-prefix/setup.cfg.inc
CONTENT
"
[build_ext]
include_dirs=${BUILD_WHEEL_INCLUDE_DIRS}
library_dirs=${BUILD_WHEEL_LIBRARY_DIRS}
")

set(CRYPTOGRAPHY_WHEEL_VER 38.0.3)
set(CRYPTOGRAPHY_WHEEL_VER 41.0.4)
ExternalProject_Add(
cryptography
GIT_REPOSITORY https://github.com/pyca/cryptography.git
Expand All @@ -380,12 +370,12 @@ ExternalProject_Add(
BUILD_IN_SOURCE ON
DEPENDS cryptographyWheelBuildEnv OpenSSL::SSL OpenSSL::Crypto
EXCLUDE_FROM_ALL ON
CONFIGURE_COMMAND ${GIT_EXECUTABLE} checkout -- setup.cfg
COMMAND ${CMAKE_COMMAND} -E cat <INSTALL_DIR>/setup.cfg.inc >> setup.cfg
CONFIGURE_COMMAND ""
BUILD_COMMAND ${CMAKE_COMMAND} -E rm -rf <INSTALL_DIR>/*.whl
COMMAND
${CMAKE_COMMAND} -E env --modify PATH=path_list_prepend:${RUST_DIR}
${cryptographyWheelBuildEnv_PIP} wheel --no-binary :all: --no-build-isolation --no-deps
${CMAKE_COMMAND} -E env OPENSSL_LIB_DIR=${CURRENT_PACKAGES_DIR}/lib
OPENSSL_INCLUDE_DIR=${CURRENT_PACKAGES_DIR}/include --modify PATH=path_list_prepend:${RUST_DIR}
-- ${cryptographyWheelBuildEnv_PIP} wheel --no-binary :all: --no-build-isolation --no-deps
--no-index --wheel-dir <TMP_DIR>/dist .
INSTALL_COMMAND
${CMAKE_COMMAND} -E copy
Expand Down

0 comments on commit 48648aa

Please sign in to comment.