Skip to content

Commit 7b6cd69

Browse files
committed
added setup.py and github action
1 parent 7a8751a commit 7b6cd69

File tree

2 files changed

+66
-0
lines changed

2 files changed

+66
-0
lines changed
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
name: Publish Python distributions to PyPI
2+
on:
3+
release:
4+
types: [published]
5+
jobs:
6+
build-n-publish:
7+
name: Build and publish Python 🐍 distributions 📦 to PyPI
8+
runs-on: ubuntu-18.04
9+
steps:
10+
- uses: actions/checkout@master
11+
- name: Set up Python 3.9
12+
uses: actions/setup-python@v1
13+
with:
14+
python-version: 3.9
15+
- name: Get version from tag
16+
if: startsWith(github.ref, 'refs/tags')
17+
env:
18+
TAG_NAME: ${{ github.event.release.tag_name }}
19+
run: echo $TAG_NAME >> VERSION
20+
- name: Install pypa/build
21+
run: >-
22+
python -m
23+
pip install
24+
build
25+
--user
26+
- name: Build a binary wheel and a source tarball
27+
run: >-
28+
python -m
29+
build
30+
--sdist
31+
--wheel
32+
--outdir dist/
33+
- name: Publish distribution 📦 to PyPI
34+
if: startsWith(github.ref, 'refs/tags')
35+
uses: pypa/gh-action-pypi-publish@master
36+
with:
37+
password: ${{ secrets.PYPI_API_TOKEN }}

setup.py

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
import setuptools
2+
3+
with open("README.md", "r") as fh:
4+
long_description = fh.read()
5+
6+
with open("VERSION", "r") as fh:
7+
version = fh.read()
8+
9+
setuptools.setup(
10+
name="aablobwrapper",
11+
version=version,
12+
author="Daniel Kirkegaard Mouritsen",
13+
author_email="daniel.mouritsen@gmail.com",
14+
description="Provide file-like wrapper for Azure Blobs",
15+
long_description=long_description,
16+
long_description_content_type="text/markdown",
17+
url="https://github.com/justdanyul/aablobwrapper",
18+
packages=setuptools.find_packages(),
19+
classifiers=[
20+
"Programming Language :: Python :: 3",
21+
"License :: OSI Approved :: MIT License",
22+
"Operating System :: OS Independent",
23+
],
24+
install_requires=[
25+
"azure-storage-blob",
26+
"aiohttp",
27+
],
28+
python_requires=">=3.7",
29+
)

0 commit comments

Comments
 (0)