Skip to content

Commit

Permalink
ops: prepare for PyPI 2
Browse files Browse the repository at this point in the history
  • Loading branch information
kerberizer committed Feb 21, 2023
1 parent cb86798 commit ec588f1
Show file tree
Hide file tree
Showing 3 changed files with 59 additions and 19 deletions.
35 changes: 35 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# This workflow will upload a Python Package using Twine when a release is created
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python#publishing-to-package-registries

name: Upload Python Package

on:
release:
types: [published]

permissions:
contents: read

jobs:
deploy:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v3
with:
python-version: '3.x'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install build
- name: Build package
run: python -m build
- name: Publish package
uses: pypa/gh-action-pypi-publish@27b31702a0e7fc50959f5ad993c78deac1bdfc29
with:
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}

1 change: 1 addition & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
include README.pypi
42 changes: 23 additions & 19 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,27 +5,27 @@

NAME = 'oranchada'

VERSION = '0.0.1'
VERSION = '0.0.2'

DESCRIPTION = 'Orange add-on for Raman spectroscopy'
README_FILE = path.join(path.dirname(__file__), 'README.pypi')
LONG_DESCRIPTION = open(README_FILE, 'r', encoding='utf-8').read()
LONG_DESCRIPTION_CONTENT_TYPE = 'text/markdown'
URL = 'https://github.com/h2020charisma/ramanchada-orange'
AUTHOR = 'IDEAconsult Ltd.'
AUTHOR_EMAIL = '[email protected]'

URL = 'https://github.com/h2020charisma/ramanchada-orange'
DESCRIPTION = 'Orange add-on for Raman spectroscopy'
LONG_DESCRIPTION = open(
path.join(path.dirname(__file__), 'README.pypi'), 'r', encoding='utf-8'
).read()

LICENSE = 'MIT'

KEYWORDS = (
KEYWORDS = [
# [PyPi](https://pypi.python.org) packages with keyword "orange3 add-on"
# can be installed using the Orange Add-on Manager
'Raman',
'oranchada',
'orange3 add-on',
'spectroscopy',
)
]

PYTHON_REQUIRES = '>3.8.0'

PACKAGES = find_packages()

Expand All @@ -41,7 +41,7 @@
'orange-canvas-core>=0.1.24',
'orange-widget-base>=4.16.1',
'pip>=9.0', # same as for Orange 3.28
'ramanchada2 @ git+https://github.com/h2020charisma/ramanchada2.git',
'ramanchada2>=0.0.1',
'setuptools>=36.3', # same as for Orange 3.28
# 'AnyQt>=0.0.6',
# 'bottleneck',
Expand Down Expand Up @@ -125,12 +125,11 @@ def include_documentation(local_dir, install_dir):
DATA_FILES.extend(doc_files)


if __name__ == '__main__':

cmdclass = {
# 'coverage': CoverageCommand,
# 'lint': LintCommand,
}
def setup_package():
# cmdclass = {
# 'coverage': CoverageCommand,
# 'lint': LintCommand,
# }

# include_documentation('doc/build/htmlhelp', 'help/orange-spectroscopy')

Expand All @@ -147,12 +146,17 @@ def include_documentation(local_dir, install_dir):
keywords=KEYWORDS,
license=LICENSE,
long_description=LONG_DESCRIPTION,
long_description_content_type='text/markdown',
long_description_content_type=LONG_DESCRIPTION_CONTENT_TYPE,
name=NAME,
namespace_packages=['orangecontrib'],
namespace_packages=["orangecontrib"],
package_data=PACKAGE_DATA,
packages=PACKAGES,
python_requires=PYTHON_REQUIRES,
url=URL,
version=VERSION,
zip_safe=False,
)


if __name__ == '__main__':
setup_package()

0 comments on commit ec588f1

Please sign in to comment.