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

[WIP] Maven wrapper #635

Open
wants to merge 10 commits into
base: main
Choose a base branch
from
Open
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
12 changes: 9 additions & 3 deletions .github/workflows/dev-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:

steps:
- name: Install Linux packages
run: yum install -y rh-maven33-maven zlib-devel.x86_64
run: yum install -y zlib-devel.x86_64

- name: Setup GraalVM
uses: graalvm/setup-graalvm@v1
Expand All @@ -45,7 +45,7 @@ jobs:

- name: Build wheel
run: |
scl enable rh-maven33 'python3 setup.py bdist_wheel'
python3 setup.py bdist_wheel
auditwheel repair dist/*.whl

- name: Install wheel
Expand Down Expand Up @@ -128,11 +128,17 @@ jobs:
python -m pip install --upgrade pip
python -m pip install -r requirements.txt

- name: Build wheel
- name: Build wheel (MacOS)
if: matrix.config.name == 'darwin'
env:
MACOSX_DEPLOYMENT_TARGET: "10.16" # to ensure pip finds wheel when Big Sur is configured to return 10.16 as version instead of 11.0
run: python setup.py bdist_wheel

- name: Build wheel (Windows)
if: matrix.config.name == 'windows'
shell: cmd # needed by the maven wrapper
run: python setup.py bdist_wheel

- name: Install wheel
shell: bash
run: python -m pip install dist/*.whl --user
Expand Down
12 changes: 9 additions & 3 deletions .github/workflows/full-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ jobs:

steps:
- name: Install Linux packages
run: yum install -y rh-maven33-maven zlib-devel.x86_64
run: yum install -y zlib-devel.x86_64

- name: Setup GraalVM
uses: graalvm/setup-graalvm@v1
Expand All @@ -65,7 +65,7 @@ jobs:

- name: Build wheel
run: |
scl enable rh-maven33 'python3 setup.py bdist_wheel'
python3 setup.py bdist_wheel
auditwheel repair dist/*.whl

- name: Install wheel
Expand Down Expand Up @@ -174,11 +174,17 @@ jobs:
python -m pip install --upgrade pip
python -m pip install -r requirements.txt

- name: Build wheel
- name: Build wheel (MacOS)
if: matrix.config.name == 'darwin'
env:
MACOSX_DEPLOYMENT_TARGET: "10.16" # to ensure pip finds wheel when Big Sur is configured to return 10.16 as version instead of 11.0
run: python setup.py bdist_wheel

- name: Build wheel (Windows)
if: matrix.config.name == 'windows'
shell: cmd # needed by the maven wrapper
run: python setup.py bdist_wheel

- name: Install wheel
shell: bash
run: python -m pip install dist/*.whl --user
Expand Down
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@
# Maven
target/

# Maven wrapper jar
java/.mvn/wrapper/*.jar

# Byte-compiled / optimized
__pycache__/
*.py[cod]
Expand Down
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,6 @@ That section is intended for developers who wish to build pypowsybl from the sou

Requirements:

- Maven >= 3.1
EtienneLt marked this conversation as resolved.
Show resolved Hide resolved
- Cmake >= 3.14
- C++11 compiler
- Python >= 3.7 for Linux, Windows and MacOS amd64
Expand Down
2 changes: 1 addition & 1 deletion cpp/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ endif()

ExternalProject_Add(mvn
SOURCE_DIR ${PYPOWSYBL_JAVA_SRC_DIR}
PATCH_COMMAND mvn --batch-mode clean package
PATCH_COMMAND ./mvnw --batch-mode clean package
CONFIGURE_COMMAND ""
BUILD_COMMAND ""
INSTALL_COMMAND ""
Expand Down
24 changes: 24 additions & 0 deletions java/.mvn/wrapper/maven-wrapper.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.


distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.9.3/apache-maven-3.9.3-bin.zip
distributionSha256Sum=80b3b63df0e40ca8cde902bb1a40e4488ede24b3f282bd7bd6fba8eb5a7e055c

# Beware: wrapperUrl must not be set! It prevents the "MVNW_REPOURL" envvar to work when downloading maven-wrapper
# SHA-256 of maven-wrapper-3.2.0.jar:
wrapperSha256Sum=e63a53cfb9c4d291ebe3c2b0edacb7622bbc480326beaa5a0456e412f52f066a
Loading