From ab61fd72481c8afad67c19717ee5d7230b4d83f3 Mon Sep 17 00:00:00 2001 From: Gijs Molenaar Date: Sat, 24 Oct 2020 11:47:58 +0200 Subject: [PATCH] Prepare for 0.9 (#103) prepare for 0.9 Co-authored-by: Gijs Molenaar --- .github/workflows/windows.yml | 55 ++++++++++++++++++----------------- Makefile | 6 ++-- README.md | 28 +++++++++++------- scripts/osx_wheel.sh | 2 +- setup.py | 2 +- 5 files changed, 50 insertions(+), 43 deletions(-) diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml index 78a5cfe..35671c9 100644 --- a/.github/workflows/windows.yml +++ b/.github/workflows/windows.yml @@ -19,18 +19,18 @@ jobs: - name: Install choco packages run: | - choco install winflexbison git unzip curl - choco install python --version 3.9.0 --force - choco install python --version 3.8.5 --force - choco install python --version 3.7.9 --force - choco install python --version 3.6.8 --force + choco install winflexbison git unzip curl python +# choco install python --version 3.9.0 --force +# choco install python --version 3.8.5 --force +# choco install python --version 3.7.9 --force +# choco install python --version 3.6.8 --force - name: Install vcpkg packages uses: lukka/run-vcpkg@v3 with: - vcpkgArguments: libiconv openssl geos libxml2 pcre pcre2 zlib getopt + vcpkgArguments: libiconv openssl geos libxml2 pcre pcre2 zlib getopt bzip2 curl vcpkgTriplet: x64-windows - vcpkgGitCommitId: df9c8e260e66713dcf768630cd434caf2c29bbff + vcpkgGitCommitId: 70f380e802852fc09c929dead9d8b8659d394181 appendedCacheKey: ${{ hashFiles(env.vcpkgResponseFile) }} - name: Get monetdb @@ -41,7 +41,6 @@ jobs: - name: Compile and install MonetDB - # TODO: why can't we use $Env:VCPKG_ROOT in cmake argument? run: | mkdir c:\MonetDB-${{ env.branch }}\build Set-Location c:\MonetDB-${{ env.branch }}\build @@ -63,38 +62,42 @@ jobs: name: Collect DLLs run: | Set-Location $GITHUB_WORKSPACE - $VCPKG_ROOT = "c:\build\vcpkg" Copy-Item C:\monetdb\bin\bat.dll monetdbe\. Copy-Item C:\monetdb\bin\mapi.dll monetdbe\. Copy-Item C:\monetdb\bin\monetdb5.dll monetdbe\. Copy-Item C:\monetdb\bin\monetdbe.dll monetdbe\. Copy-Item C:\monetdb\bin\monetdbsql.dll monetdbe\. Copy-Item C:\monetdb\bin\stream.dll monetdbe\. - Copy-Item $VCPKG_ROOT\installed\x64-windows\bin\libcrypto-1_1-x64.dll monetdbe\. - Copy-Item $VCPKG_ROOT\installed\x64-windows\bin\libiconv.dll monetdbe\. - Copy-Item $VCPKG_ROOT\installed\x64-windows\bin\libxml2.dll monetdbe\. - Copy-Item $VCPKG_ROOT\installed\x64-windows\bin\pcre.dll monetdbe\. - Copy-Item $VCPKG_ROOT\installed\x64-windows\bin\zlib1.dll monetdbe\. - Copy-Item $VCPKG_ROOT\installed\x64-windows\bin\lzma.dll monetdbe\. - Copy-Item $VCPKG_ROOT\installed\x64-windows\bin\libcharset.dll monetdbe\. - Copy-Item $VCPKG_ROOT\installed\x64-windows\bin\bz2.dll monetdbe\. - Copy-Item $VCPKG_ROOT\installed\x64-windows\bin\libcurl.dll monetdbe\. + ls $Env:VCPKG_ROOT\installed\x64-windows\bin\*.dll + Copy-Item $Env:VCPKG_ROOT\installed\x64-windows\bin\libcrypto-1_1-x64.dll monetdbe\. + Copy-Item $Env:VCPKG_ROOT\installed\x64-windows\bin\libiconv.dll monetdbe\. + Copy-Item $Env:VCPKG_ROOT\installed\x64-windows\bin\libxml2.dll monetdbe\. + Copy-Item $Env:VCPKG_ROOT\installed\x64-windows\bin\pcre.dll monetdbe\. + Copy-Item $Env:VCPKG_ROOT\installed\x64-windows\bin\zlib1.dll monetdbe\. + Copy-Item $Env:VCPKG_ROOT\installed\x64-windows\bin\lzma.dll monetdbe\. + Copy-Item $Env:VCPKG_ROOT\installed\x64-windows\bin\libcharset.dll monetdbe\. + Copy-Item $Env:VCPKG_ROOT\installed\x64-windows\bin\bz2.dll monetdbe\. + Copy-Item $Env:VCPKG_ROOT\installed\x64-windows\bin\libcurl.dll monetdbe\. - - name: Build binary python stuff + name: Upgrade pip and wheel for all pythons run: | - C:\Python38\python.exe -m pip install --upgrade pip wheel - C:\Python38\python.exe setup.py build_ext ` - --include-dirs=C:\monetdb\include ` - --library-dirs=C:\monetdb\lib + C:\Python39\python.exe -m pip install --upgrade pip wheel + - + name: Build binary python extension + run: | + C:\Python39\python.exe setup.py build_ext --include-dirs=C:\monetdb\include --library-dirs=C:\monetdb\lib - name: Install python libraries run: | - C:\Python38\python.exe -m pip install .[test] -# C:\Python38\Scripts\pytest.exe + C:\Python39\python.exe -m pip install .[test] +# - +# name: Run tests +# run: | +# C:\Python39\Scripts\pytest.exe - name: Make wheel run: | - C:\Python38\python.exe setup.py bdist_wheel + C:\Python39\python.exe setup.py bdist_wheel - uses: actions/upload-artifact@v2 name: Publish Windows binary wheels diff --git a/Makefile b/Makefile index c908010..576da77 100644 --- a/Makefile +++ b/Makefile @@ -21,13 +21,11 @@ setup: venv/installed test: setup venv/bin/pytest - -docker-wheels: # venv/ -#venv/bin/python setup.py sdist +docker-wheels: docker run -v `pwd`:$(GITHUB_WORKSPACE) ${WHEEL_IMAGE} sh -c "cd $(GITHUB_WORKSPACE); scripts/make_wheel.sh 3.6" docker run -v `pwd`:$(GITHUB_WORKSPACE) ${WHEEL_IMAGE} sh -c "cd $(GITHUB_WORKSPACE); scripts/make_wheel.sh 3.7" docker run -v `pwd`:$(GITHUB_WORKSPACE) ${WHEEL_IMAGE} sh -c "cd $(GITHUB_WORKSPACE); scripts/make_wheel.sh 3.8" - + docker run -v `pwd`:$(GITHUB_WORKSPACE) ${WHEEL_IMAGE} sh -c "cd $(GITHUB_WORKSPACE); scripts/make_wheel.sh 3.9" docker-test: docker run -ti -v `pwd`:$(GITHUB_WORKSPACE) ${TEST_IMAGE} sh -c "cd $(GITHUB_WORKSPACE); scripts/test.sh" diff --git a/README.md b/README.md index 9da247f..0811c8e 100644 --- a/README.md +++ b/README.md @@ -1,37 +1,42 @@ -# monetdbe -MonetDBe - the Python embedded MonetDB +# MonetDBe-Python + +MonetDBe-Python - the Python embedded MonetDB https://github.com/monetdBSolutions/MonetDBe-Python/ -documentation: https://monetdbe.readthedocs.io/en/latest/ +Full documentation: https://monetdbe.readthedocs.io/en/latest/ + # requirements -For binary wheel installation you need: +For a binary wheel installation you need: - * Linux or OSX 10.13+ + * An up-to-date Linux, OSX or Windows * pip >= 19.3 * Python >= 3.6 -For non-binary wheel installation (Windows) you also need to have MonetDB installed, see the source installation section below. +For a non-binary wheel installation you need to have +MonetDB installed, see the source installation section below. # install -you can install monetdbe from pypi using: +You can install monetdbe from pypi using: ``` $ pip install --upgrade pip $ pip install monetdbe ``` -On supported platforms, this will download and install the Binary wheel, otherwise a source compile is started. +On supported platforms, this will download and install the Binary wheel, +otherwise a source compile is started. # usage -Just import and get started, no running a server required. Connecting without an argument starts an in-memory storage instance: +Just import and get started, no running a server required. Connecting without +an argument starts an in-memory storage instance: ``` -from monetdb import connect +from monetdbe import connect con = connect() ``` @@ -39,8 +44,9 @@ See a simple example illustrating the Pandas support in this notebook: https://github.com/MonetDBSolutions/MonetDBe-Python/blob/master/notebooks/basic_example.ipynb + # Source installation -see the detailed online installation documentation for instructions to build from source: +See the detailed online installation documentation for instructions to build from source: https://monetdbe.readthedocs.io/en/latest/installation.html#source-installation diff --git a/scripts/osx_wheel.sh b/scripts/osx_wheel.sh index 07a66a0..5d1a273 100755 --- a/scripts/osx_wheel.sh +++ b/scripts/osx_wheel.sh @@ -7,7 +7,7 @@ set -v brew install cmake bison openssl pyenv readline bzip2 # some settings and variables -PYTHONS=(3.6.11 3.7.8 3.8.5 3.9.0b5) +PYTHONS=(3.6.11 3.7.8 3.8.5 3.9.0) BRANCH=Oct2020 # no lets set some derivative variables diff --git a/setup.py b/setup.py index f5aded6..747b0a7 100644 --- a/setup.py +++ b/setup.py @@ -22,7 +22,7 @@ setup( name="monetdbe", - version="0.8.4", + version="0.9", author="Gijs Molenaar", author_email="gijs@pythonic.nl", description="MonetDBe - the Python embedded MonetDB",