Skip to content

Commit 8f21ba2

Browse files
authored
Merge pull request #512 from abergeron/better_conda
Better conda
2 parents 1ddac4b + 25d623f commit 8f21ba2

File tree

13 files changed

+2406
-71
lines changed

13 files changed

+2406
-71
lines changed

.appveyor.yml

Lines changed: 31 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,45 +1,47 @@
1-
version: '0.7.0.{build}'
1+
version: '1.0.{build}' # This number doesn't matter
22

33
pull_requests:
44
do_not_increment_build_number: true
55

6-
image: Visual Studio 2015
7-
8-
init:
9-
- git config --global core.autocrlf input
10-
- cmd: cmake --version
11-
- cmd: msbuild /version
12-
136
platform:
147
- x64
158

9+
image: Visual Studio 2015
10+
1611
clone_folder: C:\projects\libgpuarray
1712

1813
configuration:
1914
- Release
20-
- Debug
2115

2216
environment:
2317
matrix:
24-
- PYTHON: "C:\\Python27"
25-
VS_PATH: "C:\\Users\\appveyor\\AppData\\Local\\Programs\\Common\\Microsoft\\Visual C++ for Python\\9.0"
26-
- PYTHON: "C:\\Python35"
27-
VS_PATH: "C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\VC"
18+
- CONDA_LOC: "C:\\Miniconda-x64"
19+
- CONDA_LOC: "C:\\Miniconda35-x64"
2820

2921
install:
30-
- python -m pip install mako cython
31-
32-
build_script:
33-
- echo "Python:" "%PYTHON%"
34-
- echo "Config:" "%CONFIGURATION%"
35-
- echo "VS path:" "%VS_PATH%"
36-
- cd "%VS_PATH%"
37-
- vcvarsall x64
38-
- set
39-
- cd C:\projects\libgpuarray
40-
- md %CONFIGURATION%
41-
- cd %CONFIGURATION%
42-
- cmake .. -DCMAKE_BUILD_TYPE=%CONFIGURATION% -G "NMake Makefiles"
43-
- cmake --build . --config %CONFIGURATION%
44-
45-
build: script
22+
# This breaks conda-build because of git
23+
- cmd: rmdir C:\cygwin /s /q
24+
- cmd: call %CONDA_LOC%\Scripts\activate.bat
25+
- cmd: set PYTHONUNBUFFERED=1
26+
- cmd: conda install -n root --yes conda conda-env conda-build anaconda-client
27+
# We borrow a trick from conda-forge to fix the VS2008 compiler
28+
- cmd: conda config --append channels conda-forge
29+
- cmd: conda install --yes vs2008_express_vc_python_patch
30+
- cmd: call setup_x64
31+
32+
build: off
33+
34+
test_script:
35+
- cmd: for /f "tokens=*" %%i in ('python -c "import versioneer; print(versioneer.get_version())"') do set GPUARRAY_VERSION=%%i
36+
- cmd: conda build conda
37+
- cmd: mkdir pkgs
38+
- cmd: xcopy "%CONDA_LOC%"\conda-bld\win-64\pygpu* pkgs\ /Y
39+
- cmd: xcopy "%CONDA_LOC%"\conda-bld\win-64\libgpuarray* pkgs\ /Y
40+
41+
artifacts:
42+
- path: pkgs/*
43+
name: "Conda Packages"
44+
45+
#deploy:
46+
# on:
47+
# appveyor_repo_tag: true

.gitattributes

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
pygpu/_version.py export-subst

MANIFEST.in

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
include versioneer.py
2+
include pygpu/_version.py

conda/libgpuarray/bld.bat

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
1-
cmake -G"NMake Makefiles" ^
2-
-DCMAKE_BUILD_TYPE=Release ^
1+
cmake -G "%CMAKE_GENERATOR%" ^
32
-DCMAKE_PREFIX_PATH="%LIBRARY_PREFIX%" ^
43
-DCMAKE_INSTALL_PREFIX="%LIBRARY_PREFIX%" ^
54
-DCMAKE_C_FLAGS="-I%LIBRARY_PREFIX%\include" ^
65
"%SRC_DIR%"
6+
if errorlevel 1 exit 1
77
cmake --build . --config Release --target ALL_BUILD
8-
cmake --build . --config Release --target install
8+
if errorlevel 1 exit 1
9+
cmake --build . --config Release --target install
10+
if errorlevel 1 exit 1

conda/libgpuarray/meta.yaml

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,12 @@
1-
{% set version = "0.7.0" %}
2-
31
package:
42
name: libgpuarray
5-
version: {{ version }}
3+
version: {{ environ.get('GPUARRAY_VERSION') }}
64

75
source:
8-
fn: libgpuarray-{{ version }}.tar.gz
9-
url: https://github.com/Theano/libgpuarray/archive/v{{ version }}.tar.gz
6+
path: ../../
107

118
build:
129
number: 0
13-
skip: true # [win and py35]
1410
features:
1511
- vc9 # [win and py27]
1612
- vc10 # [win and py34]
@@ -19,11 +15,10 @@ build:
1915
requirements:
2016
build:
2117
- m2-git [win]
22-
- m2-filesystem [win]
2318
- git [not win]
2419
- cmake
2520
- mako
26-
- python
21+
- python # version doesn't matter here
2722
run:
2823
- vs2008_runtime [win and py27]
2924
- vs2010_runtime [win and py34]

conda/pygpu/meta.yaml

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,11 @@
1-
{% set version = "0.7.0" %}
1+
{% set version = environ.get('GPUARRAY_VERSION') %}
22

33
package:
44
name: pygpu
55
version: {{ version }}
66

77
source:
8-
fn: libgpuarray-{{ version }}.tar.gz
9-
url: https://github.com/Theano/libgpuarray/archive/v{{ version }}.tar.gz
8+
path: ../../
109

1110
build:
1211
number: 0
@@ -19,14 +18,14 @@ requirements:
1918
- git [not win]
2019
- python
2120
- cython >=0.25
22-
- numpy x.x
21+
- numpy 1.11
2322
- mako
2423
- setuptools
2524
- libgpuarray =={{ version }}
2625

2726
run:
2827
- python
29-
- numpy x.x
28+
- {{ pin_compatible('numpy', '1.11') }}
3029
- mako
3130
- six
3231
- libgpuarray =={{ version }}

doc/conf.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
# add these directories to sys.path here. If the directory is relative to the
1818
# documentation root, use os.path.abspath to make it absolute, like shown here.
1919
sys.path.insert(0, os.path.abspath('..'))
20+
import versioneer
2021

2122
# -- General configuration -----------------------------------------------------
2223

@@ -56,10 +57,10 @@
5657
# |version| and |release|, also used in various other places throughout the
5758
# built documents.
5859
#
59-
# The short X.Y version.
60-
version = '0.7'
6160
# The full version, including alpha/beta/rc tags.
62-
release = '0.7.0'
61+
release = versioneer.get_version()
62+
# The short X.Y version.
63+
version = '.'.join(release.split('.')[:2])
6364

6465
# The language for content autogenerated by Sphinx. Refer to documentation
6566
# for a list of supported languages.

pygpu/__init__.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,13 @@ def get_include():
1212
concatenate, hstack, vstack, dstack)
1313
from ._array import ndgpuarray
1414

15-
from .version import fullversion as __version__
16-
15+
from ._version import get_versions
16+
__version__ = get_versions()['version']
17+
del get_versions
1718

1819
def test():
1920
from . import tests
2021
from .tests import main
2122
if hasattr(main, "NoseTester"):
2223
main.NoseTester(package=tests).test()
24+

0 commit comments

Comments
 (0)