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

Update to Python 3.9 #84

Merged
merged 37 commits into from
Jan 21, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
a72c592
update 3.9 in test
kotarotanahashi Jan 20, 2021
51ad12a
add brew update
kotarotanahashi Jan 20, 2021
03643ef
use scikit build for linux
kotarotanahashi Jan 20, 2021
53dc98f
add scikit-buid and cmake to requirements.txt
kotarotanahashi Jan 20, 2021
ebbbe5c
use bdist_wheel instead of pip wheel
kotarotanahashi Jan 20, 2021
8ec7bd8
add packages to requirements.txt
kotarotanahashi Jan 20, 2021
f65e9cf
test osx
kotarotanahashi Jan 20, 2021
6921a4e
update HOMEBREW_NO_AUTO_UPDATE
kotarotanahashi Jan 20, 2021
c902f92
update brew
kotarotanahashi Jan 20, 2021
10f5a7d
update pyenv
kotarotanahashi Jan 20, 2021
0f192cc
pyenv update
kotarotanahashi Jan 20, 2021
1629f5e
update pyenv
kotarotanahashi Jan 20, 2021
d8af61c
update pyenv
kotarotanahashi Jan 20, 2021
9cb5f0a
test pyenv
kotarotanahashi Jan 20, 2021
9fa087f
update pyenv
kotarotanahashi Jan 20, 2021
fade9b9
which python
kotarotanahashi Jan 20, 2021
e5a434d
save cache
kotarotanahashi Jan 20, 2021
e3752d6
use cache
kotarotanahashi Jan 20, 2021
c9b8dc1
save brew cache
kotarotanahashi Jan 20, 2021
eb4fdf6
save brew cache
kotarotanahashi Jan 20, 2021
3e2dfd6
fix save cache
kotarotanahashi Jan 20, 2021
c8341d7
use cache
kotarotanahashi Jan 20, 2021
83c485f
fix brew_version
kotarotanahashi Jan 20, 2021
b36a12c
cache test
kotarotanahashi Jan 20, 2021
a22d4ec
test deploy osx
kotarotanahashi Jan 21, 2021
40b0886
test deploy linux and osx
kotarotanahashi Jan 21, 2021
ce2074b
use pip wheel
kotarotanahashi Jan 21, 2021
2f34687
revert version
kotarotanahashi Jan 21, 2021
d25e2b8
create alias for cmake
kotarotanahashi Jan 21, 2021
a9a644f
pass PATH
kotarotanahashi Jan 21, 2021
272b8bf
test python39 on win
kotarotanahashi Jan 21, 2021
cc74f38
test deploy win
kotarotanahashi Jan 21, 2021
6b2e8c6
fix restore path
kotarotanahashi Jan 21, 2021
341e47e
test all tests and deploy win
kotarotanahashi Jan 21, 2021
a45fe8c
test all deploys
kotarotanahashi Jan 21, 2021
781efd5
set to original
kotarotanahashi Jan 21, 2021
afbf275
update to 1.0.9
kotarotanahashi Jan 21, 2021
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
123 changes: 100 additions & 23 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:

test-linux-36: &linux-test-template
docker:
- image: pyqubo/manylinux_cmake_wo_ssh:latest
- image: quay.io/pypa/manylinux1_x86_64:latest

environment:
PYTHON_PATH: /opt/python/cp36-cp36m
Expand Down Expand Up @@ -43,6 +43,7 @@ jobs:
- run: &install-dependencies-template
name: install dependencies
command: |
# Install dependencies such that pre-release versions are not installed when executing `setup.py install`
. env/bin/activate
python --version
pip install -r requirements.txt
Expand Down Expand Up @@ -80,7 +81,7 @@ jobs:

- restore_cache:
keys:
- v2-dependencies-{{ checksum "requirements.txt" }}-{{ .Environment.CIRCLE_JOB }}
- v2-dependencies-{{ checksum "requirements.txt" }}-{{ checksum "requirements_doctest.txt" }}-{{ .Environment.CIRCLE_JOB }}

- run:
name: install dependencies
Expand All @@ -93,7 +94,7 @@ jobs:
- save_cache:
paths:
- ./env
key: v2-dependencies-{{ checksum "requirements.txt" }}-{{ .Environment.CIRCLE_JOB }}
key: v2-dependencies-{{ checksum "requirements.txt" }}-{{ checksum "requirements_doctest.txt" }}-{{ .Environment.CIRCLE_JOB }}

- run: *install-package-template

Expand Down Expand Up @@ -126,37 +127,49 @@ jobs:
environment:
PYTHON_PATH: /opt/python/cp38-cp38

test-linux-39:
<<: *linux-test-template
environment:
PYTHON_PATH: /opt/python/cp39-cp39

test-linux32-35:
<<: *linux-test-template
docker:
- image: pyqubo/manylinux1_i686_cmake_wo_ssh:latest
- image: quay.io/pypa/manylinux1_i686:latest
environment:
PYTHON_PATH: /opt/python/cp35-cp35m

test-linux32-36:
<<: *linux-test-template
docker:
- image: pyqubo/manylinux1_i686_cmake_wo_ssh:latest
- image: quay.io/pypa/manylinux1_i686:latest
environment:
PYTHON_PATH: /opt/python/cp36-cp36m

test-linux32-37:
<<: *linux-test-template
docker:
- image: pyqubo/manylinux1_i686_cmake_wo_ssh:latest
- image: quay.io/pypa/manylinux1_i686:latest
environment:
PYTHON_PATH: /opt/python/cp37-cp37m

test-linux32-38:
<<: *linux-test-template
docker:
- image: pyqubo/manylinux1_i686_cmake_wo_ssh:latest
- image: quay.io/pypa/manylinux1_i686:latest
environment:
PYTHON_PATH: /opt/python/cp38-cp38

test-linux32-39:
<<: *linux-test-template
docker:
- image: quay.io/pypa/manylinux1_i686:latest
environment:
PYTHON_PATH: /opt/python/cp39-cp39

deploy-linux: &deploy-linux-template
docker:
- image: pyqubo/manylinux_cmake_wo_ssh:latest
- image: quay.io/pypa/manylinux1_x86_64:latest

environment:
GIT_URL: << pipeline.project.git_url >>
Expand All @@ -169,6 +182,7 @@ jobs:
- run:
name: checkout directory
command: |
# For the bug of CircleCI that checkout doesn't work when the tag is added
echo $GIT_URL
echo $GIT_REVISION
echo $GIT_TAG
Expand All @@ -183,9 +197,10 @@ jobs:
command: |
for PYBIN in /opt/python/*/bin; do
echo $PYBIN
if "${PYBIN}/python" -c "import sys; sys.exit(sys.version_info>=(3, 5) and sys.version_info<(3, 9))"; then continue; fi;
if "${PYBIN}/python" -c "import sys; sys.exit(sys.version_info>=(3, 5) and sys.version_info<(3, 10))"; then continue; fi;
"${PYBIN}/pip" install -r requirements.txt
"${PYBIN}/pip" wheel . -w ./wheelhouse
#"${PYBIN}/pip" wheel . -w ./wheelhouse
PATH=$PYBIN:$PATH python setup.py bdist_wheel -d ./wheelhouse
"${PYBIN}/python" setup.py sdist -d ./dist
done

Expand Down Expand Up @@ -232,7 +247,7 @@ jobs:
deploy-linux32:
<<: *deploy-linux-template
docker:
- image: pyqubo/manylinux1_i686_cmake_wo_ssh:latest
- image: quay.io/pypa/manylinux1_i686:latest

##################################################################################################
# Mac OSX
Expand All @@ -250,32 +265,56 @@ jobs:
steps:
- checkout

- restore_cache:
keys:
- v6-brew_cache-{{ .Environment.CIRCLE_JOB }}-xcode11.2.1

- run: &brew-update
name: brew update
command: |
# Only when the brew is not updated and Python=3.9, we update the brew
# since the older pyenv doesn't contain Python3.9.

brew --version
brew_version=`echo "$(brew -v)" | head -n 1 | awk '{print $2}'`
if [ $PYTHON = 3.9.1 -a $brew_version = 2.1.16 ]; then
brew update
fi
brew --version

- save_cache:
key: v6-brew_cache-{{ .Environment.CIRCLE_JOB }}-xcode11.2.1
paths:
- /Users/distiller/Library/Caches/Homebrew
- /usr/local/Homebrew

- run: &install-cmake-pyenv
name: install cmake and pyenv
name: install cmake
command: |
brew --version
brew install cmake
brew install pyenv

- restore_cache:
keys:
- v1-pyenv-{{ .Environment.CIRCLE_JOB }}-xcode11.2.1
- v4-pyenv-{{ .Environment.CIRCLE_JOB }}-xcode11.2.1

- run:
- run: &install-python
name: install python
command: |
pyenv install $PYTHON -s

- save_cache:
paths:
- ~/.pyenv
key: v1-pyenv-{{ .Environment.CIRCLE_JOB }}-xcode11.2.1
key: v4-pyenv-{{ .Environment.CIRCLE_JOB }}-xcode11.2.1

- run: &create-virtualenv-using-pyenv
name: create virtualenv
command: |
eval "$(pyenv init -)"
pyenv local $PYTHON
which python
python -m pip install virtualenv
python -m virtualenv env

Expand Down Expand Up @@ -320,6 +359,12 @@ jobs:
environment:
PYTHON: 3.8.0
HOMEBREW_NO_AUTO_UPDATE: 1

test-osx-39:
<<: *test-osx-template
environment:
PYTHON: 3.9.1
HOMEBREW_NO_AUTO_UPDATE: 0

deploy-osx-36: &deploy-osx-template
macos:
Expand All @@ -335,22 +380,30 @@ jobs:
steps:
- checkout

- restore_cache:
keys:
- v6-brew_cache-{{ .Environment.CIRCLE_JOB }}-xcode11.2.1

- run: *brew-update

- save_cache:
key: v6-brew_cache-{{ .Environment.CIRCLE_JOB }}-xcode11.2.1
paths:
- /Users/distiller/Library/Caches/Homebrew
- /usr/local/Homebrew

- run: *install-cmake-pyenv

- restore_cache:
keys:
- v1-pyenv-{{ .Environment.CIRCLE_JOB }}-xcode11.2.0
- v4-pyenv-{{ .Environment.CIRCLE_JOB }}-xcode11.2.0

- run:
name: install python
command: |
pyenv install -l
pyenv install $PYTHON -s
- run: *install-python

- save_cache:
paths:
- ~/.pyenv
key: v1-pyenv-{{ .Environment.CIRCLE_JOB }}-xcode11.2.0
key: v4-pyenv-{{ .Environment.CIRCLE_JOB }}-xcode11.2.0

- run: *create-virtualenv-using-pyenv

Expand Down Expand Up @@ -402,6 +455,13 @@ jobs:
PYTHON: 3.8.0
HOMEBREW_NO_AUTO_UPDATE: 1
MACOSX_DEPLOYMENT_TARGET: 10.9

deploy-osx-39:
<<: *deploy-osx-template
environment:
PYTHON: 3.9.1
HOMEBREW_NO_AUTO_UPDATE: 0
MACOSX_DEPLOYMENT_TARGET: 10.9


##################################################################################################
Expand All @@ -425,8 +485,9 @@ jobs:
command: |
choco install -y cmake

# Python 3.7 is already installed
if [ $PYTHON != '3.7.3' ]; then
choco install -y python --version "${PYTHON}"
choco install -y python --version "${PYTHON}"
fi

- run:
Expand All @@ -453,6 +514,12 @@ jobs:
PYTHON: 3.8.5
PYTHON_PATH: C:/Python38/

test-win-39:
<<: *test-win-template
environment:
PYTHON: 3.9.1
PYTHON_PATH: C:/Python39/

test-win-35:
<<: *test-win-template
environment:
Expand Down Expand Up @@ -501,6 +568,12 @@ jobs:
environment:
PYTHON: 3.8.5
PYTHON_PATH: C:/Python38/

deploy-win-39:
<<: *deploy-win-template
environment:
PYTHON: 3.9.1
PYTHON_PATH: C:/Python39/

deploy-win-35:
<<: *deploy-win-template
Expand All @@ -518,21 +591,25 @@ workflows:
- test-osx-36
- test-osx-37
- test-osx-38
- test-osx-39

- test-win-35
- test-win-36
- test-win-37
- test-win-38
- test-win-39

- test-linux-35
- test-linux-36
- test-linux-37
- test-linux-38
- test-linux-39

- test-linux32-35
- test-linux32-36
- test-linux32-37
- test-linux32-38
- test-linux32-39

deploy:
jobs:
Expand Down
2 changes: 1 addition & 1 deletion pyqubo/package_info.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# (major, minor, patch, prerelease)

VERSION = (1, 0, 8, "")
VERSION = (1, 0, 9, "")
__shortversion__ = '.'.join(map(str, VERSION[:3]))
__version__ = '.'.join(map(str, VERSION[:3])) + "".join(VERSION[3:])

Expand Down
8 changes: 5 additions & 3 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
dimod==0.9.2
dimod==0.9.13
numpy==1.18.2
coverage==4.5.1
codecov==2.1.9
dwave-neal==0.5.4
dwave-neal==0.5.7
Deprecated==1.2.10
nbsphinx==0.3.5
nbsphinx==0.3.5
scikit-build>=0.11.1
cmake>=3.18.2
12 changes: 7 additions & 5 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
from setuptools import Command


if os.getenv('READTHEDOCS'):
if os.getenv('READTHEDOCS') or platform.system() == "Linux":
from skbuild import setup
else:
from setuptools import setup
Expand Down Expand Up @@ -101,14 +101,15 @@ def run(self):
packages = ['pyqubo', 'pyqubo.integer', 'pyqubo.utils']

install_requires = [
'numpy>=1.16.0,<2.0.0',
'dimod>=0.9.2',
'dwave-neal>=0.5.4',
'numpy<1.20,>=1.17.3',
'dimod>=0.9.13',
'dwave-neal>=0.5.7',
'Deprecated>=1.2.10',
'six>=1.11.0'
]

python_requires = '>=3.5'

python_requires = '>=3.5, <3.10'

setup(
name=package_info.__package_name__,
Expand All @@ -134,6 +135,7 @@ def run(self):
'Programming Language :: Python :: 3.6',
'Programming Language :: Python :: 3.7',
'Programming Language :: Python :: 3.8',
'Programming Language :: Python :: 3.9',
'License :: OSI Approved :: Apache Software License',
]
)