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

Bump to 3.30.4 and start providing a Windows build #13

Merged
merged 3 commits into from
Jan 30, 2019
Merged
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
53 changes: 53 additions & 0 deletions .appveyor.yml
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
3 changes: 0 additions & 3 deletions .azure-pipelines/azure-pipelines-linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,6 @@ jobs:
strategy:
maxParallel: 8
matrix:
linux_python2.7:
CONFIG: linux_python2.7
UPLOAD_PACKAGES: False
linux_python3.6:
CONFIG: linux_python3.6
UPLOAD_PACKAGES: False
Expand Down
3 changes: 0 additions & 3 deletions .azure-pipelines/azure-pipelines-osx.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,6 @@ jobs:
strategy:
maxParallel: 8
matrix:
osx_python2.7:
CONFIG: osx_python2.7
UPLOAD_PACKAGES: False
osx_python3.6:
CONFIG: osx_python3.6
UPLOAD_PACKAGES: False
Expand Down
96 changes: 96 additions & 0 deletions .azure-pipelines/azure-pipelines-win.yml
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'))
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
c_compiler:
- gcc
- vs2015
channel_sources:
- conda-forge,defaults
channel_targets:
- conda-forge main
docker_image:
- condaforge/linux-anvil-comp7
glib:
- '2.58'
libffi:
Expand All @@ -19,4 +17,7 @@ pin_run_as_build:
min_pin: x.x
max_pin: x.x
python:
- '2.7'
- '3.6'
zip_keys:
- - python
- c_compiler
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
MACOSX_DEPLOYMENT_TARGET:
- '10.9'
c_compiler:
- clang
- vs2015
channel_sources:
- conda-forge,defaults
channel_targets:
Expand All @@ -10,10 +8,6 @@ glib:
- '2.58'
libffi:
- '3.2'
macos_machine:
- x86_64-apple-darwin13.4.0
macos_min_version:
- '10.9'
pin_run_as_build:
glib:
max_pin: x.x
Expand All @@ -23,4 +17,7 @@ pin_run_as_build:
min_pin: x.x
max_pin: x.x
python:
- '2.7'
- '3.7'
zip_keys:
- - python
- c_compiler
18 changes: 0 additions & 18 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,23 +5,6 @@
version: 2

jobs:
build_linux_python2.7:
working_directory: ~/test
machine: true
environment:
- CONFIG: "linux_python2.7"
steps:
- checkout
- run:
name: Fast finish outdated PRs and merge PRs
command: |
./.circleci/fast_finish_ci_pr_build.sh
./.circleci/checkout_merge_commit.sh
- run:
command: docker pull condaforge/linux-anvil-comp7
- run:
# Run, test and (if we have a BINSTAR_TOKEN) upload the distributions.
command: ./.circleci/run_docker_build.sh
build_linux_python3.6:
working_directory: ~/test
machine: true
Expand Down Expand Up @@ -61,6 +44,5 @@ workflows:
version: 2
build_and_test:
jobs:
- build_linux_python2.7
- build_linux_python3.6
- build_linux_python3.7
1 change: 0 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ osx_image: xcode9.4

env:
matrix:
- CONFIG=osx_python2.7
- CONFIG=osx_python3.6
- CONFIG=osx_python3.7

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ Current build status

[![Linux](https://img.shields.io/circleci/project/github/conda-forge/pygobject-feedstock/master.svg?label=Linux)](https://circleci.com/gh/conda-forge/pygobject-feedstock)
[![OSX](https://img.shields.io/travis/conda-forge/pygobject-feedstock/master.svg?label=macOS)](https://travis-ci.org/conda-forge/pygobject-feedstock)
![Windows disabled](https://img.shields.io/badge/Windows-disabled-lightgrey.svg)
[![Windows](https://img.shields.io/appveyor/ci/conda-forge/pygobject-feedstock/master.svg?label=Windows)](https://ci.appveyor.com/project/conda-forge/pygobject-feedstock/branch/master)

Current release info
====================
Expand Down
3 changes: 2 additions & 1 deletion azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,5 @@

jobs:
- template: ./.azure-pipelines/azure-pipelines-linux.yml
- template: ./.azure-pipelines/azure-pipelines-osx.yml
- template: ./.azure-pipelines/azure-pipelines-osx.yml
- template: ./.azure-pipelines/azure-pipelines-win.yml
41 changes: 41 additions & 0 deletions recipe/bld.bat
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
12 changes: 7 additions & 5 deletions recipe/build.sh
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
14 changes: 14 additions & 0 deletions recipe/macos-tests.patch
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
20 changes: 20 additions & 0 deletions recipe/meson-rpaths.patch
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
Loading