Skip to content

Commit c853c33

Browse files
Peter GyorokPeter Gyorok
authored andcommitted
add publish workflow
1 parent be270b6 commit c853c33

3 files changed

Lines changed: 60 additions & 7 deletions

File tree

‎.github/workflows/publish.yml‎

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
name: QPython publish
2+
3+
on:
4+
workflow_dispatch:
5+
inputs:
6+
version:
7+
description: "Package version (x.y.z)"
8+
required: true
9+
prod:
10+
description: "Use the real PyPI instead of the test one"
11+
type: boolean
12+
required: false
13+
14+
jobs:
15+
build:
16+
runs-on: ubuntu-latest
17+
steps:
18+
- name: Input check
19+
env:
20+
version: ${{ github.event.inputs.version }}
21+
run: |
22+
if ! [[ $version =~ ^[0-9.]+$ ]]; then echo invalid version; exit 1; fi
23+
- uses: actions/checkout@v2
24+
- name: Set up Python
25+
uses: actions/setup-python@v2
26+
with:
27+
python-version: 3.8
28+
- name: Install dependencies
29+
run: |
30+
python -m pip install --upgrade pip
31+
pip install --upgrade wheel
32+
pip install -r requirements.txt -U
33+
- name: Build
34+
run: |
35+
sed -i "s/@@VERSION_PLACEHOLDER@@/${{ github.event.inputs.version }}/g" qpython/__init__.py
36+
python setup.py build_ext --inplace
37+
python setup.py sdist
38+
- name: Test
39+
run: |
40+
env PYTHONPATH=. py.test
41+
- name: Build manylinux
42+
uses: RalfG/python-wheels-manylinux-build@v0.3.4
43+
with:
44+
python-versions: 'cp36-cp36m cp37-cp37m cp38-cp38 cp39-cp39'
45+
build-requirements: 'cython numpy'
46+
- name: Publish
47+
env:
48+
prodInput: ${{ github.event.inputs.prod }}
49+
run: |
50+
pip install --upgrade twine
51+
find dist -name "*-linux*" -delete
52+
ls -l dist
53+
repoParam=
54+
if [[ -z ${prodInput} ]]; then repoParam="--repository testpypi"; fi
55+
twine upload ${repoParam} dist/* --username __token__ --password ${{ secrets.PYPI_API }}

‎qpython/__init__.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
__all__ = ['qconnection', 'qtype', 'qtemporal', 'qcollection']
1818

1919

20-
__version__ = '2.0.0'
20+
__version__ = '@@VERSION_PLACEHOLDER@@'
2121

2222

2323

‎setup.py‎

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -44,14 +44,14 @@ def read(fname):
4444
return open(os.path.join(os.path.dirname(__file__), fname)).read()
4545

4646

47-
setup(name = 'qPython',
47+
setup(name = 'qPython3',
4848
version = __version__,
4949
description = 'kdb+ interfacing library for Python',
5050
long_description=read('README.rst'),
5151

52-
author = 'exxeleron',
53-
author_email = 'kdbtools@devnet.de',
54-
url = 'http://github.com/exxeleron/qPython',
52+
author = 'finos',
53+
author_email = 'data-tech-kdb@finos.org',
54+
url = 'https://github.com/finos/qPython',
5555
license = 'Apache License Version 2.0',
5656

5757
ext_modules = ext_modules,
@@ -72,8 +72,6 @@ def read(fname):
7272
'Operating System :: POSIX',
7373
'Operating System :: Unix',
7474
'Programming Language :: Python',
75-
'Programming Language :: Python :: 2',
76-
'Programming Language :: Python :: 2.7',
7775
'Programming Language :: Python :: 3',
7876
'Programming Language :: Python :: 3.4',
7977
'Programming Language :: Python :: 3.5',

0 commit comments

Comments
 (0)