From ddea4125a167c653c55145a99fc11bafada224f8 Mon Sep 17 00:00:00 2001 From: Anselm Kruis Date: Sat, 1 Apr 2017 17:34:21 +0200 Subject: [PATCH 1/4] Modify the recipe for Stackless Python 2.7.13 --- recipe/brand_python.py | 6 +++--- recipe/build.sh | 1 + recipe/meta.yaml | 23 ++++++++++++++++------- recipe/run_test.py | 2 +- 4 files changed, 21 insertions(+), 11 deletions(-) diff --git a/recipe/brand_python.py b/recipe/brand_python.py index d58bee0b2..38603bbe6 100644 --- a/recipe/brand_python.py +++ b/recipe/brand_python.py @@ -26,9 +26,9 @@ def patch_get_version(msg): lines = iter(content) with open(get_version_file, 'w') as fh: for line in lines: - if line.strip().startswith('PyOS_snprintf(version, sizeof(version)'): + if line.strip().startswith('PyOS_snprintf(version, sizeof(version)') and "Stackless" in line: fh.write(' PyOS_snprintf(version, sizeof(version),\n') - fh.write(' "%.80s ' + msg.replace('"', '\\"') + ' (%.80s) %.80s",\n') + fh.write(' "%.80s Stackless %.80s ' + msg.replace('"', '\\"') + ' (%.80s) %.80s",\n') else: fh.write(line) @@ -37,5 +37,5 @@ def patch_get_version(msg): if msg == '': msg = "| packaged by conda-forge |" -patch_platform(msg) +# patch_platform(msg) # not required for stackless patch_get_version(msg) diff --git a/recipe/build.sh b/recipe/build.sh index 580ed63d8..3c4c597c3 100644 --- a/recipe/build.sh +++ b/recipe/build.sh @@ -30,6 +30,7 @@ if [ `uname` == Linux ]; then --prefix=$PREFIX \ --with-tcltk-includes="-I$PREFIX/include" \ --with-tcltk-libs="-L$PREFIX/lib -ltcl8.5 -ltk8.5" \ + --enable-stacklessfewerregisters \ CPPFLAGS="-I$PREFIX/include" \ LDFLAGS="-L$PREFIX/lib -Wl,-rpath=$PREFIX/lib,--no-as-needed" fi diff --git a/recipe/meta.yaml b/recipe/meta.yaml index a67afa215..386bab1b2 100644 --- a/recipe/meta.yaml +++ b/recipe/meta.yaml @@ -1,14 +1,18 @@ -{% set version = "2.7.13" %} -{% set sha256 = "a4f05a0720ce0fd92626f0278b6b433eee9a6173ddf2bced7957dfb599a5ece1" %} +{% set version_major = "2" %} +{% set version_minor = "7" %} +{% set version_micro = "13" %} +{% set version = [version_major, version_minor, version_micro]|join('.') %} + +{% set md5 = "d05ce87ad8c831ae70629197cdee0965" %} package: name: python version: {{ version }} source: - fn: Python-{{ version }}.tgz - url: https://www.python.org/ftp/python/{{ version }}/Python-{{ version }}.tgz - sha256: {{ sha256 }} + fn: stackless-{{ [version_major, version_minor, version_micro]|join }}-export.tar.xz + url: http://www.stackless.com/binaries/stackless-{{ [version_major, version_minor, version_micro]|join }}-export.tar.xz + md5: {{ md5 }} patches: - osx-dist.patch # [osx and x86_64] - win-find_exe.patch # [win] @@ -23,6 +27,8 @@ build: - vc9 # [win] script_env: - python_branding + features: + - stackless requirements: build: @@ -48,15 +54,18 @@ test: - pydoc -h - python-config --help # [unix] - idle -h + requires: + - stackless about: - home: http://www.python.org/ + home: http://www.stackless.com/ license: PSF summary: General purpose programming language - + extra: recipe-maintainers: - jakirkham - jjhelmus - msarahan - pelson + - akruis diff --git a/recipe/run_test.py b/recipe/run_test.py index 0a7010585..069ea785a 100644 --- a/recipe/run_test.py +++ b/recipe/run_test.py @@ -129,7 +129,7 @@ print('OPENSSL_VERSION:', ssl.OPENSSL_VERSION) if sys.platform != 'win32': - assert '1.0.2h' in ssl.OPENSSL_VERSION + assert '1.0.2k' in ssl.OPENSSL_VERSION pprint(platform._sys_version()) # This is in the anaconda-recipes test file but is not working... From 923853144a35bedb711327cb903ff8f9387cefdd Mon Sep 17 00:00:00 2001 From: Anselm Kruis Date: Sat, 1 Apr 2017 18:49:07 +0200 Subject: [PATCH 2/4] conda forge still uses openssl 1.0.2h --- recipe/run_test.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipe/run_test.py b/recipe/run_test.py index 069ea785a..0a7010585 100644 --- a/recipe/run_test.py +++ b/recipe/run_test.py @@ -129,7 +129,7 @@ print('OPENSSL_VERSION:', ssl.OPENSSL_VERSION) if sys.platform != 'win32': - assert '1.0.2k' in ssl.OPENSSL_VERSION + assert '1.0.2h' in ssl.OPENSSL_VERSION pprint(platform._sys_version()) # This is in the anaconda-recipes test file but is not working... From b747d455bbe1290785e0bab4b809fd20cc479a8c Mon Sep 17 00:00:00 2001 From: Anselm Kruis Date: Sun, 2 Apr 2017 21:46:54 +0200 Subject: [PATCH 3/4] Added xz as a Windows build requirement. The Stackless source comes as a tar.xz archive. To unpack it, tar needs the unxz command, which isn't available by default on windows. --- recipe/meta.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/recipe/meta.yaml b/recipe/meta.yaml index 386bab1b2..020ae6d2d 100644 --- a/recipe/meta.yaml +++ b/recipe/meta.yaml @@ -39,6 +39,7 @@ requirements: - tk 8.5.* # [unix] - zlib 1.2.* # [unix] - ncurses 5.9* # [linux] + - xz # [win] run: - openssl 1.0.* # [unix] - readline 6.2* # [unix] From 4022a6187b6dfc72db69c914bc5d52153f4e4b30 Mon Sep 17 00:00:00 2001 From: Anselm Kruis Date: Mon, 3 Apr 2017 16:03:43 +0200 Subject: [PATCH 4/4] Use a tar.bz2 archive as source. Conda cant't extract tar.xz files on Windows / Python 2.7. See https://github.com/conda/conda-build/issues/1536 for details. --- recipe/meta.yaml | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/recipe/meta.yaml b/recipe/meta.yaml index 020ae6d2d..8f348d721 100644 --- a/recipe/meta.yaml +++ b/recipe/meta.yaml @@ -3,15 +3,15 @@ {% set version_micro = "13" %} {% set version = [version_major, version_minor, version_micro]|join('.') %} -{% set md5 = "d05ce87ad8c831ae70629197cdee0965" %} +{% set md5 = "c01210c08328f4afecb5d4c95d8af0ae" %} package: name: python version: {{ version }} source: - fn: stackless-{{ [version_major, version_minor, version_micro]|join }}-export.tar.xz - url: http://www.stackless.com/binaries/stackless-{{ [version_major, version_minor, version_micro]|join }}-export.tar.xz + fn: stackless-{{ [version_major, version_minor, version_micro]|join }}-export.tar.bz2 + url: http://www.stackless.com/binaries/stackless-{{ [version_major, version_minor, version_micro]|join }}-export.tar.bz2 md5: {{ md5 }} patches: - osx-dist.patch # [osx and x86_64] @@ -39,7 +39,6 @@ requirements: - tk 8.5.* # [unix] - zlib 1.2.* # [unix] - ncurses 5.9* # [linux] - - xz # [win] run: - openssl 1.0.* # [unix] - readline 6.2* # [unix]