Skip to content

Commit

Permalink
empty
Browse files Browse the repository at this point in the history
  • Loading branch information
joocer committed Mar 5, 2023
1 parent aeab3a5 commit a36b444
Show file tree
Hide file tree
Showing 6 changed files with 309 additions and 0 deletions.
257 changes: 257 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,257 @@
name: Release to PyPI

on:
release:
types: [published]
branches:
- 'main'

jobs:

build-linux-cp38:
runs-on: ubuntu-latest
container: quay.io/pypa/manylinux2014_x86_64

steps:
- uses: actions/checkout@master

- name: Install Python package dependencies
run: /opt/python/cp38-cp38/bin/python -m pip install --upgrade cython wheel numpy

- name: Build binary wheel
run: /opt/python/cp38-cp38/bin/python setup.py bdist_wheel

- name: Archive dist artifacts
uses: actions/upload-artifact@v1
with:
name: dist-linux-3.8
path: dist


build-linux-cp39:
runs-on: ubuntu-latest
container: quay.io/pypa/manylinux2014_x86_64

steps:
- uses: actions/checkout@master

- name: Install Python package dependencies
run: /opt/python/cp39-cp39/bin/python -m pip install --upgrade cython wheel numpy setuptools_rust

- name: Build binary wheel
run: /opt/python/cp39-cp39/bin/python setup.py bdist_wheel

- name: Archive dist artifacts
uses: actions/upload-artifact@v1
with:
name: dist-linux-3.9
path: dist

build-linux-cp310:
runs-on: ubuntu-latest
container: quay.io/pypa/manylinux2014_x86_64

steps:
- uses: actions/checkout@master

- name: Install Python package dependencies
run: /opt/python/cp310-cp310/bin/python -m pip install --upgrade cython wheel numpy setuptools_rust

- name: Build binary wheel
run: /opt/python/cp310-cp310/bin/python setup.py bdist_wheel

- name: Archive dist artifacts
uses: actions/upload-artifact@v1
with:
name: dist-linux-3.10
path: dist

build-linux-cp311:
runs-on: ubuntu-latest
container: quay.io/pypa/manylinux2014_x86_64

steps:
- uses: actions/checkout@master

- name: Install Python package dependencies
run: /opt/python/cp311-cp311/bin/python -m pip install --upgrade cython wheel numpy setuptools_rust

- name: Build binary wheel
run: /opt/python/cp311-cp311/bin/python setup.py bdist_wheel

- name: Archive dist artifacts
uses: actions/upload-artifact@v1
with:
name: dist-linux-3.11
path: dist

build-macos:
runs-on: macos-latest
strategy:
max-parallel: 4
matrix:
python-version: ['3.8', '3.9', '3.10', '3.11']

steps:
- uses: actions/checkout@master

- name: Install rust toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true

- name: Set up Python ${{ matrix.python-version }} x64
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}

- name: Install Python package dependencies
run: python -m pip install --upgrade cython wheel numpy setuptools_rust

- name: Build on macOS universal2
shell: bash
env:
DEVELOPER_DIR: /Applications/Xcode.app/Contents/Developer
MACOSX_DEPLOYMENT_TARGET: '10.15'
ARCHFLAGS: -arch x86_64 -arch arm64
PYO3_CROSS_LIB_DIR: /Applications/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.8/lib
run: python setup.py bdist_wheel

- name: Archive dist artifacts
uses: actions/upload-artifact@v1
with:
name: dist-macos-${{ matrix.python-version }}
path: dist

build-windows:
runs-on: windows-latest
strategy:
max-parallel: 3
matrix:
python-version: ['3.8', '3.9', '3.10', '3.11']

steps:
- uses: actions/checkout@master

- name: Download Build Tools for Visual Studio 2019
run: Invoke-WebRequest -Uri https://aka.ms/vs/16/release/vs_buildtools.exe -OutFile vs_buildtools.exe

- name: Run vs_buildtools.exe install
run: ./vs_buildtools.exe --quiet --wait --norestart --nocache --add Microsoft.VisualStudio.Component.VC.Tools.x86.x64 --add Microsoft.VisualStudio.Component.VC.v141.x86.x64 --add Microsoft.VisualStudio.Component.VC.140 --includeRecommended

- name: Set up Python ${{ matrix.python-version }} x64
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
architecture: x64

- name: Install Python package dependencies
run: python -m pip install --upgrade cython wheel numpy setuptools_rust

- name: Build binary wheel
run: python setup.py bdist_wheel

- name: Archive dist artifacts
uses: actions/upload-artifact@v1
with:
name: dist-windows-${{ matrix.python-version }}
path: dist

upload:
needs: [build-linux-cp38, build-linux-cp39, build-linux-cp310, build-linux-cp311, build-macos, build-windows]
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v1

- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: 3.9

- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install --upgrade cython wheel numpy setuptools_rust
python -m pip install --upgrade -r requirements.txt
- name: Create source dist
run: python setup.py sdist

- name: Stage linux 3.8
uses: actions/download-artifact@v1
with:
name: dist-linux-3.8
- run: mv -v dist-linux-3.8/* dist/

- name: Stage linux 3.9
uses: actions/download-artifact@v1
with:
name: dist-linux-3.9
- run: mv -v dist-linux-3.9/* dist/

- name: Stage linux 3.10
uses: actions/download-artifact@v1
with:
name: dist-linux-3.10
- run: mv -v dist-linux-3.10/* dist/

- name: Stage linux 3.11
uses: actions/download-artifact@v1
with:
name: dist-linux-3.11
- run: mv -v dist-linux-3.11/* dist/

- name: Stage macos 3.8
uses: actions/download-artifact@v1
with:
name: dist-macos-3.8
- run: mv -v dist-macos-3.8/* dist/

- name: Stage macos 3.9
uses: actions/download-artifact@v1
with:
name: dist-macos-3.9
- run: mv -v dist-macos-3.9/* dist/

- name: Stage macos 3.10
uses: actions/download-artifact@v1
with:
name: dist-macos-3.10
- run: mv -v dist-macos-3.10/* dist/

- name: Stage macos 3.11
uses: actions/download-artifact@v1
with:
name: dist-macos-3.11
- run: mv -v dist-macos-3.11/* dist/

- name: Stage windows 3.8
uses: actions/download-artifact@v1
with:
name: dist-windows-3.8
- run: mv -v dist-windows-3.8/* dist/

- name: Stage windows 3.9
uses: actions/download-artifact@v1
with:
name: dist-windows-3.9
- run: mv -v dist-windows-3.9/* dist/

- name: Stage windows 3.10
uses: actions/download-artifact@v1
with:
name: dist-windows-3.10
- run: mv -v dist-windows-3.10/* dist/

- name: Stage windows 3.11
uses: actions/download-artifact@v1
with:
name: dist-windows-3.11
- run: mv -v dist-windows-3.11/* dist/

- name: Publish distribution 📦 to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
password: ${{ secrets.PYPI_API_TOKEN }}
Empty file added orso/__init__.py
Empty file.
2 changes: 2 additions & 0 deletions orso/version.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
__version__ = "0.0.0"
__author__ = "@joocer"
11 changes: 11 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
[tool.black]
line-length = 100
target-version = ['py310']

[tool.isort]
profile = "black"
src_paths = ["hadrodb"]
line_length = 100
multi_line_output = 9
force_single_line = true
float_to_top = true
2 changes: 2 additions & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
cityhash
ormsgpack
37 changes: 37 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
from setuptools import find_packages
from setuptools import setup

LIBRARY = "orso"


__version__ = "notset"
with open(f"{LIBRARY}/version.py", mode="r") as v:
vers = v.read()
exec(vers) # nosec

with open("README.md", mode="r", encoding="UTF8") as rm:
long_description = rm.read()

try:
with open("requirements.txt", "r") as f:
required = f.read().splitlines()
except:
with open(f"{LIBRARY}.egg-info/requires.txt", "r") as f:
required = f.read().splitlines()


setup_config = {
"name": LIBRARY,
"version": __version__,
"description": "🐻 Dataframe Library",
"long_description": long_description,
"long_description_content_type": "text/markdown",
"maintainer": "@joocer",
"author": "@joocer",
"author_email": "[email protected]",
"packages": find_packages(include=[LIBRARY, f"{LIBRARY}.*"]),
"url": "https://github.com/mabel-dev/orso/",
"install_requires": required,
}

setup(**setup_config)

0 comments on commit a36b444

Please sign in to comment.