-
Notifications
You must be signed in to change notification settings - Fork 65
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Files required for PyPi support (#33)
* PyPi support * v3.5 no longer available * Only check installability * Make setuptools happy * Update setup.py Co-authored-by: Toche Camille <tochecamille@gmail.com>
- Loading branch information
1 parent
c49bbad
commit b718c86
Showing
4 changed files
with
87 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
name: Python package | ||
|
||
on: [push, pull_request] | ||
|
||
jobs: | ||
build: | ||
|
||
runs-on: ubuntu-latest | ||
strategy: | ||
max-parallel: 4 | ||
matrix: | ||
python-version: [2.7, 3.6, 3.7, 3.8, 3.9] | ||
|
||
steps: | ||
- uses: actions/checkout@v1 | ||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v1 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
- name: Only check installability | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install -e . | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
name: Upload Python Package | ||
|
||
on: | ||
release: | ||
types: [created] | ||
|
||
jobs: | ||
deploy: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v1 | ||
- name: Set up Python | ||
uses: actions/setup-python@v1 | ||
with: | ||
python-version: '3.x' | ||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install setuptools wheel twine | ||
- name: Build and publish | ||
env: | ||
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }} | ||
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }} | ||
run: | | ||
python setup.py sdist bdist_wheel | ||
twine upload dist/* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
__version__ = '0.0.1' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
from setuptools import find_packages, setup | ||
from io import open | ||
import os | ||
import re | ||
|
||
_version_re = re.compile(r"__version__\s=\s'(.*)'") | ||
|
||
install_requires = ['webdriver_manager', 'selenium'] | ||
with open("readme.md", "r", encoding="utf-8") as fh: | ||
long_description = fh.read() | ||
|
||
base_dir = os.path.dirname(__file__) | ||
|
||
with open(os.path.join(base_dir, "__about__.py"), 'r') as f: | ||
version = _version_re.search(f.read()).group(1) | ||
|
||
setup( | ||
name="instadm", | ||
version=version, | ||
author="Toche Camille", | ||
author_email="tochecamille@gmail.com", | ||
url="https://github.com/CamTosh/instagram-bot-dm", | ||
description="Instagram bot to send direct messages", | ||
long_description=long_description, | ||
long_description_content_type="text/markdown", | ||
packages=find_packages(exclude=["tests", "docs"]), | ||
zip_safe=False, | ||
license="GPLv3", | ||
install_requires=install_requires, | ||
include_package_data=True, | ||
classifiers=[ | ||
"Intended Audience :: Developers", | ||
"Operating System :: OS Independent", | ||
"Topic :: Software Development", | ||
], | ||
) |