From eff3e2dfb25de2e79c2d16e83fd023f8b52adc24 Mon Sep 17 00:00:00 2001 From: mckaymatt Date: Sat, 24 Jun 2017 11:02:50 -0400 Subject: [PATCH 1/9] work around windows issue with ruamel.yaml --- HISTORY.rst | 2 +- appveyor.yml | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/HISTORY.rst b/HISTORY.rst index 1fb9580..7786242 100644 --- a/HISTORY.rst +++ b/HISTORY.rst @@ -2,7 +2,7 @@ History ======= -0.8.2 (2017-06-23) +0.8.3 (2017-06-24) ------------------ * First release on PyPI. diff --git a/appveyor.yml b/appveyor.yml index 14746ac..423120f 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -77,7 +77,8 @@ install: - set PATH=%PATH%;C:\Users\appveyor\.cargo\bin - rustc -Vv - cargo -V - - "%PYTHON_DIR%\\python.exe -m pip install pip>=9.0.1 ruamel.yaml==0.14.12" + - "%PYTHON_DIR%\\python.exe -m pip install -U pip>=9.0.1 wheel" + - "%PYTHON_DIR%\\python.exe -m pip install ruamel.yaml==0.14.12 --no-binary :all:" - "%PYTHON_DIR%\\python.exe -m pip install -U urllib3[secure] scikit-ci==0.14.0" - "%PYTHON_DIR%\\python -m ci install" From be3514490418e9bb7bdb9c4ca610421b3514ca3c Mon Sep 17 00:00:00 2001 From: mckaymatt Date: Sat, 24 Jun 2017 11:03:00 -0400 Subject: [PATCH 2/9] =?UTF-8?q?Bump=20version:=200.8.3=20=E2=86=92=200.8.4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- rust_pypi_example/__init__.py | 2 +- rust_pypi_example/rust/Cargo.lock | 2 +- rust_pypi_example/rust/Cargo.toml | 2 +- setup.cfg | 2 +- setup.py | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/rust_pypi_example/__init__.py b/rust_pypi_example/__init__.py index ed7d6e5..f584fa9 100644 --- a/rust_pypi_example/__init__.py +++ b/rust_pypi_example/__init__.py @@ -2,4 +2,4 @@ __author__ = """Matt McKay""" __email__ = 'mckaymatt@gmail.com' -__version__ = '0.8.3' +__version__ = '0.8.4' diff --git a/rust_pypi_example/rust/Cargo.lock b/rust_pypi_example/rust/Cargo.lock index fd49d2c..7daf91f 100644 --- a/rust_pypi_example/rust/Cargo.lock +++ b/rust_pypi_example/rust/Cargo.lock @@ -1,4 +1,4 @@ [root] name = "rust_pypi_example" -version = "0.8.3" +version = "0.8.4" diff --git a/rust_pypi_example/rust/Cargo.toml b/rust_pypi_example/rust/Cargo.toml index 286cf65..63fc595 100644 --- a/rust_pypi_example/rust/Cargo.toml +++ b/rust_pypi_example/rust/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "rust_pypi_example" -version = "0.8.3" +version = "0.8.4" authors = ["Matt McKay "] [lib] diff --git a/setup.cfg b/setup.cfg index d383be0..0875c40 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,5 +1,5 @@ [bumpversion] -current_version = 0.8.3 +current_version = 0.8.4 tag = True commit = True diff --git a/setup.py b/setup.py index c8f116a..78f94b2 100644 --- a/setup.py +++ b/setup.py @@ -30,7 +30,7 @@ setup( name='rust_pypi_example', - version='0.8.3', + version='0.8.4', description="Python Boilerplate contains all the boilerplate you need to create a Python wheel with Rust.", long_description=readme + '\n\n' + history, author="Matt McKay", From 821c40b95a609c49289ac741b42dedd8097a49e0 Mon Sep 17 00:00:00 2001 From: mckaymatt Date: Sat, 24 Jun 2017 13:49:42 -0400 Subject: [PATCH 3/9] work around https://github.com/scikit-build/scikit-ci/issues/35 --- HISTORY.rst | 2 +- appveyor.yml | 11 ++++++----- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/HISTORY.rst b/HISTORY.rst index 7786242..96ceebb 100644 --- a/HISTORY.rst +++ b/HISTORY.rst @@ -2,7 +2,7 @@ History ======= -0.8.3 (2017-06-24) +0.8.4 (2017-06-24) ------------------ * First release on PyPI. diff --git a/appveyor.yml b/appveyor.yml index 423120f..3cca5ef 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -77,16 +77,17 @@ install: - set PATH=%PATH%;C:\Users\appveyor\.cargo\bin - rustc -Vv - cargo -V - - "%PYTHON_DIR%\\python.exe -m pip install -U pip>=9.0.1 wheel" - - "%PYTHON_DIR%\\python.exe -m pip install ruamel.yaml==0.14.12 --no-binary :all:" + - "%PYTHON_DIR%\\python.exe -m pip install -U pip>=9.0.1" + # without updating wheel and setuptools, ruamel.yaml will fail on python 3.4 + - "%PYTHON_DIR%\\python.exe -m pip install -U wheel setuptools" - "%PYTHON_DIR%\\python.exe -m pip install -U urllib3[secure] scikit-ci==0.14.0" - - "%PYTHON_DIR%\\python -m ci install" + - "%PYTHON_DIR%\\python.exe -m ci install" build_script: - - "%PYTHON_DIR%\\python -m ci build" + - "%PYTHON_DIR%\\python.exe -m ci build" test_script: - - "%PYTHON_DIR%\\python -m ci test" + - "%PYTHON_DIR%\\python.exe -m ci test" - ps: >- Get-ChildItem .\dist\ From 65603e1b50bbf3cd3ec2eedd359776aa43913304 Mon Sep 17 00:00:00 2001 From: mckaymatt Date: Sat, 24 Jun 2017 13:50:16 -0400 Subject: [PATCH 4/9] =?UTF-8?q?Bump=20version:=200.8.4=20=E2=86=92=200.8.5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- rust_pypi_example/__init__.py | 2 +- rust_pypi_example/rust/Cargo.lock | 2 +- rust_pypi_example/rust/Cargo.toml | 2 +- setup.cfg | 2 +- setup.py | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/rust_pypi_example/__init__.py b/rust_pypi_example/__init__.py index f584fa9..e88cd73 100644 --- a/rust_pypi_example/__init__.py +++ b/rust_pypi_example/__init__.py @@ -2,4 +2,4 @@ __author__ = """Matt McKay""" __email__ = 'mckaymatt@gmail.com' -__version__ = '0.8.4' +__version__ = '0.8.5' diff --git a/rust_pypi_example/rust/Cargo.lock b/rust_pypi_example/rust/Cargo.lock index 7daf91f..17801ee 100644 --- a/rust_pypi_example/rust/Cargo.lock +++ b/rust_pypi_example/rust/Cargo.lock @@ -1,4 +1,4 @@ [root] name = "rust_pypi_example" -version = "0.8.4" +version = "0.8.5" diff --git a/rust_pypi_example/rust/Cargo.toml b/rust_pypi_example/rust/Cargo.toml index 63fc595..65ad859 100644 --- a/rust_pypi_example/rust/Cargo.toml +++ b/rust_pypi_example/rust/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "rust_pypi_example" -version = "0.8.4" +version = "0.8.5" authors = ["Matt McKay "] [lib] diff --git a/setup.cfg b/setup.cfg index 0875c40..4353b86 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,5 +1,5 @@ [bumpversion] -current_version = 0.8.4 +current_version = 0.8.5 tag = True commit = True diff --git a/setup.py b/setup.py index 78f94b2..443b61e 100644 --- a/setup.py +++ b/setup.py @@ -30,7 +30,7 @@ setup( name='rust_pypi_example', - version='0.8.4', + version='0.8.5', description="Python Boilerplate contains all the boilerplate you need to create a Python wheel with Rust.", long_description=readme + '\n\n' + history, author="Matt McKay", From 2973a55e7245b97628a9980accc432803ae6f17e Mon Sep 17 00:00:00 2001 From: mckaymatt Date: Sun, 9 Jul 2017 18:55:01 -0400 Subject: [PATCH 5/9] don't push dists from Make --- HISTORY.rst | 2 +- Makefile | 9 ++++----- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/HISTORY.rst b/HISTORY.rst index 96ceebb..b06264f 100644 --- a/HISTORY.rst +++ b/HISTORY.rst @@ -2,7 +2,7 @@ History ======= -0.8.4 (2017-06-24) +0.8.5 (2017-07-09) ------------------ * First release on PyPI. diff --git a/Makefile b/Makefile index 1cfc897..dff2685 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,4 @@ -.PHONY: clean clean-test clean-pyc clean-build clean-venv docs help install dist release test test-all +.PHONY: clean clean-test clean-pyc clean-build clean-venv docs help install dist test test-all .DEFAULT_GOAL := help define BROWSER_PYSCRIPT import os, webbrowser, sys @@ -58,6 +58,7 @@ lint: venv ## check style with flake8 venv/bin/python -m flake8 rust_pypi_example tests test: venv ## This will use py.test because of pytest-runner + venv/bin/python setup.py build_ext venv/bin/python setup.py check venv/bin/python setup.py test @@ -87,16 +88,14 @@ docs: venv ## generate Sphinx HTML documentation, including API docs servedocs: venv docs ## compile the docs watching for changes venv/bin/python -m watchmedo shell-command -p '*.rst' -c '$(MAKE) -C docs html' -R -D . -release: venv clean ## package and upload a release - venv/bin/python setup.py sdist upload - venv/bin/python setup.py bdist_wheel upload - dist: venv clean ## builds source and wheel package venv/bin/python setup.py sdist + venv/bin/python setup.py build_ext venv/bin/python setup.py bdist_wheel ls -l dist install: venv clean ## install the package to the active Python's site-packages + venv/bin/python setup.py build_ext venv/bin/python setup.py install From cf71cf323c8bb9eec329473afbdf5362fd6db9a3 Mon Sep 17 00:00:00 2001 From: mckaymatt Date: Sun, 9 Jul 2017 18:56:55 -0400 Subject: [PATCH 6/9] =?UTF-8?q?Bump=20version:=200.8.5=20=E2=86=92=200.8.6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- rust_pypi_example/__init__.py | 2 +- rust_pypi_example/rust/Cargo.lock | 2 +- rust_pypi_example/rust/Cargo.toml | 2 +- setup.cfg | 2 +- setup.py | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/rust_pypi_example/__init__.py b/rust_pypi_example/__init__.py index e88cd73..7fd1ae4 100644 --- a/rust_pypi_example/__init__.py +++ b/rust_pypi_example/__init__.py @@ -2,4 +2,4 @@ __author__ = """Matt McKay""" __email__ = 'mckaymatt@gmail.com' -__version__ = '0.8.5' +__version__ = '0.8.6' diff --git a/rust_pypi_example/rust/Cargo.lock b/rust_pypi_example/rust/Cargo.lock index 17801ee..0278f95 100644 --- a/rust_pypi_example/rust/Cargo.lock +++ b/rust_pypi_example/rust/Cargo.lock @@ -1,4 +1,4 @@ [root] name = "rust_pypi_example" -version = "0.8.5" +version = "0.8.6" diff --git a/rust_pypi_example/rust/Cargo.toml b/rust_pypi_example/rust/Cargo.toml index 65ad859..d4e1398 100644 --- a/rust_pypi_example/rust/Cargo.toml +++ b/rust_pypi_example/rust/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "rust_pypi_example" -version = "0.8.5" +version = "0.8.6" authors = ["Matt McKay "] [lib] diff --git a/setup.cfg b/setup.cfg index 4353b86..578346f 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,5 +1,5 @@ [bumpversion] -current_version = 0.8.5 +current_version = 0.8.6 tag = True commit = True diff --git a/setup.py b/setup.py index 443b61e..158cb67 100644 --- a/setup.py +++ b/setup.py @@ -30,7 +30,7 @@ setup( name='rust_pypi_example', - version='0.8.5', + version='0.8.6', description="Python Boilerplate contains all the boilerplate you need to create a Python wheel with Rust.", long_description=readme + '\n\n' + history, author="Matt McKay", From 31773158bdcf2c971fac0d5552b61263633d6878 Mon Sep 17 00:00:00 2001 From: mckaymatt Date: Sat, 15 Jul 2017 20:23:33 -0400 Subject: [PATCH 7/9] remove dup code --- HISTORY.rst | 2 +- rust_pypi_example/__init__.py | 2 +- rust_pypi_example/rust/Cargo.lock | 2 +- rust_pypi_example/rust/Cargo.toml | 2 +- rust_pypi_example/rust_pypi_example.py | 46 -------------------------- setup.cfg | 2 +- setup.py | 2 +- 7 files changed, 6 insertions(+), 52 deletions(-) diff --git a/HISTORY.rst b/HISTORY.rst index b06264f..46a9486 100644 --- a/HISTORY.rst +++ b/HISTORY.rst @@ -2,7 +2,7 @@ History ======= -0.8.5 (2017-07-09) +0.8.7 (2017-07-15) ------------------ * First release on PyPI. diff --git a/rust_pypi_example/__init__.py b/rust_pypi_example/__init__.py index 7fd1ae4..28da4f0 100644 --- a/rust_pypi_example/__init__.py +++ b/rust_pypi_example/__init__.py @@ -2,4 +2,4 @@ __author__ = """Matt McKay""" __email__ = 'mckaymatt@gmail.com' -__version__ = '0.8.6' +__version__ = '0.8.7' diff --git a/rust_pypi_example/rust/Cargo.lock b/rust_pypi_example/rust/Cargo.lock index 0278f95..762504a 100644 --- a/rust_pypi_example/rust/Cargo.lock +++ b/rust_pypi_example/rust/Cargo.lock @@ -1,4 +1,4 @@ [root] name = "rust_pypi_example" -version = "0.8.6" +version = "0.8.7" diff --git a/rust_pypi_example/rust/Cargo.toml b/rust_pypi_example/rust/Cargo.toml index d4e1398..dd66366 100644 --- a/rust_pypi_example/rust/Cargo.toml +++ b/rust_pypi_example/rust/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "rust_pypi_example" -version = "0.8.6" +version = "0.8.7" authors = ["Matt McKay "] [lib] diff --git a/rust_pypi_example/rust_pypi_example.py b/rust_pypi_example/rust_pypi_example.py index 6d4088b..4285796 100644 --- a/rust_pypi_example/rust_pypi_example.py +++ b/rust_pypi_example/rust_pypi_example.py @@ -1,49 +1,3 @@ -# -*- coding: utf-8 -*- -import os.path -import sys -from cffi import FFI - -# See https://github.com/SimonSapin/hello-pyrust - -ffi = FFI() -ffi.cdef(open(os.path.join( - # FIXME: path is hard-coded - os.path.dirname(__file__), 'rust', 'src', - 'rust_pypi_example.h', -)).read()) - -if sys.platform == 'win32': - DYNAMIC_LIB_FORMAT = '%s.dll' -elif sys.platform == 'darwin': - DYNAMIC_LIB_FORMAT = 'lib%s.dylib' -elif "linux" in sys.platform: - DYNAMIC_LIB_FORMAT = 'lib%s.so' -else: - raise NotImplementedError('No implementation for "{}".' - ' Supported platforms are ' - '"win32", "darwin", and "linux"' - ''.format(sys.platform)) - -DLPATH = os.path.join( - # If the crate is built without the "--release" flag - # the path will be 'rust/target/debug' and this will - # cause OSError - os.path.dirname(__file__), 'rust', 'target', 'release', - DYNAMIC_LIB_FORMAT % 'rust_pypi_example' - ) - -rust_lib = ffi.dlopen(DLPATH) - - -def main(): - assert rust_lib.is_prime(13) == 1 - assert rust_lib.is_prime(12) == 0 - - -if __name__ == '__main__': - main() - - # -*- coding: utf-8 -*- import os.path import os diff --git a/setup.cfg b/setup.cfg index 578346f..0e721b7 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,5 +1,5 @@ [bumpversion] -current_version = 0.8.6 +current_version = 0.8.7 tag = True commit = True diff --git a/setup.py b/setup.py index 158cb67..717a757 100644 --- a/setup.py +++ b/setup.py @@ -30,7 +30,7 @@ setup( name='rust_pypi_example', - version='0.8.6', + version='0.8.7', description="Python Boilerplate contains all the boilerplate you need to create a Python wheel with Rust.", long_description=readme + '\n\n' + history, author="Matt McKay", From c1f0d9aa58413dc610773a9a10207501e0059572 Mon Sep 17 00:00:00 2001 From: mckaymatt Date: Sat, 15 Jul 2017 20:25:20 -0400 Subject: [PATCH 8/9] =?UTF-8?q?Bump=20version:=200.8.7=20=E2=86=92=200.8.7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- rust_pypi_example/__init__.py | 2 +- setup.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/rust_pypi_example/__init__.py b/rust_pypi_example/__init__.py index 28da4f0..d3f8446 100644 --- a/rust_pypi_example/__init__.py +++ b/rust_pypi_example/__init__.py @@ -2,4 +2,4 @@ __author__ = """Matt McKay""" __email__ = 'mckaymatt@gmail.com' -__version__ = '0.8.7' +__version__ = '__version__ = '0.8.7'' diff --git a/setup.py b/setup.py index 717a757..e61a1ca 100644 --- a/setup.py +++ b/setup.py @@ -30,7 +30,7 @@ setup( name='rust_pypi_example', - version='0.8.7', + version='version='0.8.7'', description="Python Boilerplate contains all the boilerplate you need to create a Python wheel with Rust.", long_description=readme + '\n\n' + history, author="Matt McKay", From df7b54cddb5ce96500ef35d04938b5584594aa16 Mon Sep 17 00:00:00 2001 From: mckaymatt Date: Sat, 15 Jul 2017 20:43:31 -0400 Subject: [PATCH 9/9] =?UTF-8?q?Revert=20"Bump=20version:=200.8.7=20?= =?UTF-8?q?=E2=86=92=200.8.7"?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This reverts commit c1f0d9aa58413dc610773a9a10207501e0059572. --- rust_pypi_example/__init__.py | 2 +- setup.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/rust_pypi_example/__init__.py b/rust_pypi_example/__init__.py index d3f8446..28da4f0 100644 --- a/rust_pypi_example/__init__.py +++ b/rust_pypi_example/__init__.py @@ -2,4 +2,4 @@ __author__ = """Matt McKay""" __email__ = 'mckaymatt@gmail.com' -__version__ = '__version__ = '0.8.7'' +__version__ = '0.8.7' diff --git a/setup.py b/setup.py index e61a1ca..717a757 100644 --- a/setup.py +++ b/setup.py @@ -30,7 +30,7 @@ setup( name='rust_pypi_example', - version='version='0.8.7'', + version='0.8.7', description="Python Boilerplate contains all the boilerplate you need to create a Python wheel with Rust.", long_description=readme + '\n\n' + history, author="Matt McKay",