forked from conda-forge/pygobject-feedstock
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request conda-forge#13 from pkgw/bump-meson
Bump to 3.30.4 and start providing a Windows build
- Loading branch information
Showing
15 changed files
with
259 additions
and
51 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
# This file was automatically generated by conda-smithy. To update a component of this | ||
# file, make changes to conda-forge.yml and/or recipe/meta.yaml, and run | ||
# "conda smithy rerender". | ||
# -*- mode: yaml -*- | ||
|
||
environment: | ||
|
||
BINSTAR_TOKEN: | ||
# The BINSTAR_TOKEN secure variable. This is defined canonically in conda-forge.yml. | ||
secure: tumuXLL8PU75WMnRDemRy02ruEq2RpNxeK3dz0MjFssnosPm2v4EFjfNB4PTotA1 | ||
|
||
matrix: | ||
- CONFIG: win_c_compilervs2015python3.6 | ||
CONDA_INSTALL_LOCN: C:\Miniconda36-x64 | ||
|
||
- CONFIG: win_c_compilervs2015python3.7 | ||
CONDA_INSTALL_LOCN: C:\Miniconda36-x64 | ||
|
||
|
||
# We always use a 64-bit machine, but can build x86 distributions | ||
# with the TARGET_ARCH variable. | ||
platform: | ||
- x64 | ||
|
||
install: | ||
# If there is a newer build queued for the same PR, cancel this one. | ||
- cmd: | | ||
powershell -Command "(New-Object Net.WebClient).DownloadFile('https://raw.githubusercontent.com/conda-forge/conda-forge-ci-setup-feedstock/master/recipe/conda_forge_ci_setup/ff_ci_pr_build.py', 'ff_ci_pr_build.py')" | ||
ff_ci_pr_build -v --ci "appveyor" "%APPVEYOR_ACCOUNT_NAME%/%APPVEYOR_PROJECT_SLUG%" "%APPVEYOR_BUILD_NUMBER%" "%APPVEYOR_PULL_REQUEST_NUMBER%" | ||
del ff_ci_pr_build.py | ||
# Cygwin's git breaks conda-build. (See https://github.com/conda-forge/conda-smithy-feedstock/pull/2.) | ||
- cmd: rmdir C:\cygwin /s /q | ||
|
||
# Add path, activate `conda` and update conda. | ||
- cmd: call %CONDA_INSTALL_LOCN%\Scripts\activate.bat | ||
- cmd: conda.exe update --yes --quiet conda | ||
|
||
- cmd: set PYTHONUNBUFFERED=1 | ||
|
||
# Configure the VM. | ||
# Tell conda we want an updated version of conda-forge-ci-setup and conda-build | ||
- cmd: conda.exe install -n root -c conda-forge --quiet --yes conda-forge-ci-setup=2 conda-build | ||
- cmd: setup_conda_rc .\ .\recipe .\.ci_support\%CONFIG%.yaml | ||
- cmd: run_conda_forge_build_setup | ||
|
||
# Skip .NET project specific build phase. | ||
build: off | ||
|
||
test_script: | ||
- conda.exe build recipe -m .ci_support\%CONFIG%.yaml | ||
deploy_script: | ||
- cmd: upload_package .\ .\recipe .ci_support\%CONFIG%.yaml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,96 @@ | ||
# This file was generated automatically from conda-smithy. To update this configuration, | ||
# update the conda-forge.yml and/or the recipe/meta.yaml. | ||
# -*- mode: yaml -*- | ||
|
||
jobs: | ||
- job: win_64 | ||
pool: | ||
vmImage: vs2017-win2016 | ||
timeoutInMinutes: 240 | ||
strategy: | ||
maxParallel: 4 | ||
matrix: | ||
win_c_compilervs2015python3.6: | ||
CONFIG: win_c_compilervs2015python3.6 | ||
CONDA_BLD_PATH: D:\\bld\\ | ||
UPLOAD_PACKAGES: False | ||
win_c_compilervs2015python3.7: | ||
CONFIG: win_c_compilervs2015python3.7 | ||
CONDA_BLD_PATH: D:\\bld\\ | ||
UPLOAD_PACKAGES: False | ||
steps: | ||
# TODO: Fast finish on azure pipelines? | ||
- script: | | ||
ECHO ON | ||
- script: | | ||
choco install vcpython27 -fdv -y --debug | ||
condition: contains(variables['CONFIG'], 'vs2008') | ||
displayName: Install vcpython27.msi (if needed) | ||
# Cygwin's git breaks conda-build. (See https://github.com/conda-forge/conda-smithy-feedstock/pull/2.) | ||
# - script: rmdir C:\cygwin /s /q | ||
# continueOnError: true | ||
|
||
- powershell: | | ||
Set-PSDebug -Trace 1 | ||
$batchcontent = @" | ||
ECHO ON | ||
SET vcpython=C:\Program Files (x86)\Common Files\Microsoft\Visual C++ for Python\9.0 | ||
DIR "%vcpython%" | ||
CALL "%vcpython%\vcvarsall.bat" %* | ||
"@ | ||
$batchDir = "C:\Program Files (x86)\Common Files\Microsoft\Visual C++ for Python\9.0\VC" | ||
$batchPath = "$batchDir" + "\vcvarsall.bat" | ||
New-Item -Path $batchPath -ItemType "file" -Force | ||
Set-Content -Value $batchcontent -Path $batchPath | ||
Get-ChildItem -Path $batchDir | ||
Get-ChildItem -Path ($batchDir + '\..') | ||
condition: contains(variables['CONFIG'], 'vs2008') | ||
displayName: Patch vs2008 (if needed) | ||
- task: CondaEnvironment@1 | ||
inputs: | ||
packageSpecs: 'python=3.6 conda-build conda conda-forge::conda-forge-ci-setup=2' # Optional | ||
installOptions: "-c conda-forge" | ||
updateConda: false | ||
displayName: Install conda-build and activate environment | ||
|
||
- script: set PYTHONUNBUFFERED=1 | ||
|
||
# Configure the VM | ||
- script: setup_conda_rc .\ .\recipe .\.ci_support\%CONFIG%.yaml | ||
|
||
# Configure the VM. | ||
- script: | | ||
run_conda_forge_build_setup | ||
displayName: conda-forge build setup | ||
# Special cased version setting some more things! | ||
- script: | | ||
conda.exe build recipe -m .ci_support\%CONFIG%.yaml --quiet | ||
displayName: Build recipe (vs2008) | ||
env: { | ||
VS90COMNTOOLS: "C:\\Program Files (x86)\\Common Files\\Microsoft\\Visual C++ for Python\\9.0\\VC\\bin", | ||
} | ||
condition: contains(variables['CONFIG'], 'vs2008') | ||
- script: | | ||
conda.exe build recipe -m .ci_support\%CONFIG%.yaml --quiet | ||
displayName: Build recipe | ||
condition: not(contains(variables['CONFIG'], 'vs2008')) | ||
- script: | | ||
upload_package .\ .\recipe .ci_support\%CONFIG%.yaml | ||
condition: not(eq(variables['UPLOAD_PACKAGES'], 'False')) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
@ECHO ON | ||
|
||
@REM I cannot for the life of me figure out how Cygwin/MSYS2 figures out its | ||
@REM root directory, which it uses to find the /etc/fstab which *sometimes* | ||
@REM affects the choice of the cygdrive prefix. But, regardless of *why*, | ||
@REM I find that we need this to work: | ||
mkdir %BUILD_PREFIX%\Library\etc | ||
echo none / cygdrive binary,user 0 0 >%BUILD_PREFIX%\Library\etc\fstab | ||
echo none /tmp usertemp binary,posix=0 0 0 >>%BUILD_PREFIX%\Library\etc\fstab | ||
|
||
@REM Here we ditch the -GL flag, which messes up symbol resolution. | ||
set "CFLAGS=-MD" | ||
set "CXXFLAGS=-MD" | ||
|
||
mkdir forgebuild | ||
cd forgebuild | ||
|
||
@REM pkg-config setup | ||
FOR /F "delims=" %%i IN ('cygpath.exe -m "%LIBRARY_PREFIX%"') DO set "LIBRARY_PREFIX_M=%%i" | ||
set PKG_CONFIG_PATH=%LIBRARY_PREFIX_M%/lib/pkgconfig | ||
|
||
@REM NB: We should provide Cairo, but it's a bit tricky on Windows | ||
@REM so we're punting on it for now. | ||
%PYTHON% %PREFIX%\Scripts\meson --buildtype=release --prefix=%LIBRARY_PREFIX_M% --backend=ninja -Dpython=%PYTHON% -Dpycairo=false .. | ||
if errorlevel 1 exit 1 | ||
|
||
ninja -v | ||
if errorlevel 1 exit 1 | ||
|
||
ninja test | ||
if errorlevel 1 exit 1 | ||
|
||
ninja install | ||
if errorlevel 1 exit 1 | ||
|
||
@REM Meson doesn't put the Python files in the right place. | ||
cd %LIBRARY_PREFIX%\lib\python* | ||
cd site-packages | ||
move *.egg-info %PREFIX%\lib\site-packages | ||
move gi %PREFIX%\lib\site-packages\gi | ||
move pygtkcompat %PREFIX%\lib\site-packages\gi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,16 @@ | ||
#!/usr/bin/env bash | ||
|
||
set -e | ||
set -ex | ||
|
||
if [ -n "$OSX_ARCH" ] ; then | ||
export LDFLAGS="$LDFLAGS -Wl,-rpath,$PREFIX/lib" | ||
else | ||
export LDFLAGS="$LDFLAGS -Wl,-rpath-link,$PREFIX/lib" | ||
fi | ||
|
||
./configure --with-python=${PYTHON} --prefix="${PREFIX}" | ||
make check TEST_NAMES=test_gi | ||
make install | ||
|
||
mkdir forgebuild | ||
cd forgebuild | ||
meson --buildtype=release --prefix="$PREFIX" --backend=ninja -Dlibdir=lib .. | ||
ninja -v | ||
ninja test | ||
ninja install |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
diff --git a/tests/meson.build b/tests/meson.build | ||
index f72ead0..c500d90 100644 | ||
--- a/tests/meson.build | ||
+++ b/tests/meson.build | ||
@@ -115,6 +115,9 @@ endif | ||
if host_machine.system() == 'linux' | ||
envdata.prepend('LD_LIBRARY_PATH', meson.current_build_dir()) | ||
endif | ||
+if host_machine.system() == 'darwin' | ||
+ envdata.prepend('DYLD_LIBRARY_PATH', meson.current_build_dir()) | ||
+endif | ||
if host_machine.system() == 'windows' | ||
envdata.prepend('PATH', join_paths(get_option('prefix'), get_option('bindir'))) | ||
endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
diff --git a/gi/meson.build b/gi/meson.build | ||
index c1afd68..15a6521 100644 | ||
--- a/gi/meson.build | ||
+++ b/gi/meson.build | ||
@@ -76,6 +76,7 @@ giext = python.extension_module('_gi', sources, | ||
dependencies : [python_ext_dep, glib_dep, gi_dep, ffi_dep], | ||
include_directories: include_directories('..'), | ||
install: true, | ||
+ install_rpath: join_paths(get_option('prefix'), get_option('libdir')), | ||
subdir : 'gi', | ||
c_args: pyext_c_args + main_c_args | ||
) | ||
@@ -84,6 +85,7 @@ if with_pycairo | ||
gicairoext = python.extension_module('_gi_cairo', ['pygi-foreign-cairo.c'], | ||
dependencies : [python_ext_dep, glib_dep, gi_dep, ffi_dep, pycairo_dep, cairo_dep, cairo_gobject_dep], | ||
install: true, | ||
+ install_rpath: join_paths(get_option('prefix'), get_option('libdir')), | ||
subdir : 'gi', | ||
c_args: pyext_c_args + main_c_args) | ||
endif |
Oops, something went wrong.