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

Various Python 3.5 fixes #51

Merged
merged 7 commits into from
Jul 26, 2016
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
6 changes: 2 additions & 4 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,10 @@ install:
bash $MINICONDA_FILE -b

export PATH=/Users/travis/miniconda3/bin:$PATH

conda update --yes conda
conda install --yes conda-build=1.20.0 jinja2 anaconda-client
conda config --add channels conda-forge
conda config --set show_channel_urls true

conda install --yes --quiet conda-forge-build-setup
source run_conda_forge_build_setup

script:
- conda build ./recipe
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ About conda-forge

conda-forge is a community-led conda channel of installable packages.
In order to provide high-quality builds, the process has been automated into the
conda-forge GitHub organization. The conda-forge organization contains one repository
conda-forge GitHub organization. The conda-forge organization contains one repository
for each of the installable packages. Such a repository is known as a *feedstock*.

A feedstock is made up of a conda recipe (the instructions on what and how to build
Expand Down Expand Up @@ -71,7 +71,7 @@ Current build status
====================

Linux: [![Circle CI](https://circleci.com/gh/conda-forge/python-feedstock.svg?style=svg)](https://circleci.com/gh/conda-forge/python-feedstock)
OSX: [![TravisCI](https://travis-ci.org/conda-forge/python-feedstock.svg?branch=master)](https://travis-ci.org/conda-forge/python-feedstock)
OSX: [![TravisCI](https://travis-ci.org/conda-forge/python-feedstock.svg?branch=master)](https://travis-ci.org/conda-forge/python-feedstock)
Windows: [![AppVeyor](https://ci.appveyor.com/api/projects/status/github/conda-forge/python-feedstock?svg=True)](https://ci.appveyor.com/project/conda-forge/python-feedstock/branch/master)

Current release info
Expand All @@ -92,7 +92,7 @@ install and use.

In order to produce a uniquely identifiable distribution:
* If the version of a package **is not** being increased, please add or increase
the [``build/number``](http://conda.pydata.org/docs/building/meta-yaml.html#build-number-and-string).
the [``build/number``](http://conda.pydata.org/docs/building/meta-yaml.html#build-number-and-string).
* If the version of a package **is** being increased, please remember to return
the [``build/number``](http://conda.pydata.org/docs/building/meta-yaml.html#build-number-and-string)
back to 0.
14 changes: 5 additions & 9 deletions appveyor.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# This file was automatically generated by conda-smithy. To update a component of this
# file, make changes to conda-forge.yaml and/or recipe/meta.yaml, and run
# "conda-smithy regenerate".
# "conda smithy rerender".

environment:

Expand Down Expand Up @@ -46,18 +46,14 @@ install:
- cmd: rmdir C:\cygwin /s /q
- appveyor DownloadFile "https://raw.githubusercontent.com/pelson/Obvious-CI/master/bootstrap-obvious-ci-and-miniconda.py"
- cmd: python bootstrap-obvious-ci-and-miniconda.py %CONDA_INSTALL_LOCN% %TARGET_ARCH% %CONDA_PY:~0,1% --without-obvci
- cmd: set PATH=%CONDA_INSTALL_LOCN%;%CONDA_INSTALL_LOCN%\scripts;%PATH%
- cmd: call %CONDA_INSTALL_LOCN%\Scripts\activate.bat
- cmd: set PYTHONUNBUFFERED=1

- cmd: conda config --add channels conda-forge
- cmd: conda config --set show_channel_urls true
- cmd: conda install -c pelson/channel/development --yes --quiet obvious-ci
- cmd: conda info
- cmd: conda install -n root --quiet --yes conda-build anaconda-client jinja2 setuptools
# Workaround for Python 3.4 and x64 bug in latest conda-build.
# FIXME: Remove once there is a release that fixes the upstream issue
# ( https://github.com/conda/conda-build/issues/895 ).
- cmd: if "%TARGET_ARCH%" == "x64" if "%CONDA_PY%" == "34" conda install conda-build=1.20.0 --yes
- cmd: conda config --add channels conda-forge
- cmd: conda install -n root --quiet --yes conda-forge-build-setup
- cmd: run_conda_forge_build_setup

# Skip .NET project specific build phase.
build: off
Expand Down
6 changes: 2 additions & 4 deletions ci_support/run_docker_build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ config=$(cat <<CONDARC

channels:
- conda-forge

- defaults # As we need conda-build

conda-build:
Expand All @@ -39,9 +38,8 @@ echo "$config" > ~/.condarc
# A lock sometimes occurs with incomplete builds. The lock file is stored in build_artefacts.
conda clean --lock

conda update --yes --all
conda install --yes conda-build
conda info
conda install --yes --quiet conda-forge-build-setup
source run_conda_forge_build_setup

# Embarking on 1 case(s).
set -x
Expand Down
10 changes: 7 additions & 3 deletions recipe/meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,17 @@ source:
sha256: 1524b840e42cf3b909e8f8df67c1724012c7dc7f9d076d4feef2d3eff031e8a0
patches:
- omit-local-site-packages.patch # [osx]
- osx64-dist.patch # [osx and x86_64]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Though I don't think OS X 32-bit has been supported for a bit. I don't have any problem with adding x86_64.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree, for use in conda-forge the x86_64 tag is not needed but adding it makes the recipe match better with the one in anaconda-recipes.

- win-find_exe.patch # [win]
- win-library_bin.patch # [win]

build:
number: 1
number: 2
# Windows has issues updating python if conda is using files itself.
# Copy rather than link.
no_link:
- DLLs/_ctypes.py # [win]
- bin/python
- DLLs/_ctypes.pyd # [win]
- bin/python3.5 # [unix]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What's going on with this?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Both of those lines were taken from the python 3.5 recipe on anaconda-recipes

bin/python is a symbolic link to bin/python3.5 so it makes more sense to not link the true file as opposed to the symbolic link.

DLLs/_ctypes.py does not exist and it should be _ctypes.pyd, just a typo in the original recipe that was never caught. I believe it must be because of the comment above in the souce.

track_features:
- vc14 # [win]

Expand All @@ -37,6 +40,7 @@ requirements:
- xz 5.2.* # [unix]
- zlib 1.2.* # [unix]
- ncurses 5.9* # [linux]
- vs2015_runtime # [win]

test:
commands:
Expand Down
12 changes: 12 additions & 0 deletions recipe/osx64-dist.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
diff --git Lib/distutils/unixccompiler.py Lib/distutils/unixccompiler.py
index 094a2f0..4252605 100644
--- Lib/distutils/unixccompiler.py
+++ Lib/distutils/unixccompiler.py
@@ -191,6 +191,7 @@ class UnixCCompiler(CCompiler):
linker[i] = self.compiler_cxx[i]

if sys.platform == 'darwin':
+ ld_args = ['-arch', 'x86_64'] + ld_args
linker = _osx_support.compiler_fixup(linker, ld_args)

self.spawn(linker + ld_args)
35 changes: 35 additions & 0 deletions recipe/win-find_exe.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
diff --git Lib/distutils/spawn.py Lib/distutils/spawn.py
index 5dd415a..ce85901 100644
--- Lib/distutils/spawn.py
+++ Lib/distutils/spawn.py
@@ -176,17 +176,16 @@ def find_executable(executable, path=None):
path = os.environ['PATH']

paths = path.split(os.pathsep)
- base, ext = os.path.splitext(executable)
-
- if (sys.platform == 'win32') and (ext != '.exe'):
- executable = executable + '.exe'
-
- if not os.path.isfile(executable):
- for p in paths:
- f = os.path.join(p, executable)
- if os.path.isfile(f):
- # the file exists, we have a shot at spawn working
- return f
- return None
- else:
- return executable
+
+ for ext in '.exe', '.bat', '':
+ newexe = executable + ext
+
+ if os.path.isfile(newexe):
+ return newexe
+ else:
+ for p in paths:
+ f = os.path.join(p, newexe)
+ if os.path.isfile(f):
+ # the file exists, we have a shot at spawn working
+ return f
+ return None
12 changes: 12 additions & 0 deletions recipe/win-library_bin.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
--- Lib/site.py.orig 2016-07-23 09:17:55.000000000 -0500
+++ Lib/site.py 2016-07-23 09:25:06.000000000 -0500
@@ -556,6 +556,9 @@
execsitecustomize()
if ENABLE_USER_SITE:
execusercustomize()
+ if sys.platform == 'win32':
+ os.environ["PATH"] = r"%s\Library\bin;%s" % (sys.prefix,
+ os.environ["PATH"])

# Prevent edition of sys.path when python was started with -S and
# site is imported later.