Skip to content

Commit

Permalink
Prepare for 0.9 (#103)
Browse files Browse the repository at this point in the history
prepare for 0.9

Co-authored-by: Gijs Molenaar <gijs.molenaar@dpgmedia.nl>
  • Loading branch information
gijzelaerr and Gijs Molenaar committed Oct 24, 2020
1 parent 4f2067e commit ab61fd7
Show file tree
Hide file tree
Showing 5 changed files with 50 additions and 43 deletions.
55 changes: 29 additions & 26 deletions .github/workflows/windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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
Expand Down
6 changes: 2 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
28 changes: 17 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,46 +1,52 @@
# 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()
```

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
2 changes: 1 addition & 1 deletion scripts/osx_wheel.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down

0 comments on commit ab61fd7

Please sign in to comment.