Skip to content

Commit

Permalink
Improve importing, drop versioneer requirement
Browse files Browse the repository at this point in the history
  • Loading branch information
cbpowell committed Mar 14, 2022
1 parent 169ffda commit 9884b20
Show file tree
Hide file tree
Showing 7 changed files with 22 additions and 677 deletions.
20 changes: 19 additions & 1 deletion .github/workflows/python-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,24 +15,42 @@ on:
types: [published, released]

jobs:
deploy:
pypi-publish:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2

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

- name: Get git tag version
run: echo git_tag=$(git describe --tags $(git rev-list --tags --max-count=1)) >> $GITHUB_ENV

- name: Get PyPI package version
run: echo pypi_version=$(python3 setup.py -V) >> $GITHUB_ENV

- name: Check for consistent versions
if: ${{ env.git_tag != env.pypi_version }}
run: |
echo Git Tag ${{ env.git_tag }} does not match PyPI version ${{ env.pypi_version }}. Canceling workflow.
exit 1
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install build wheel
- name: Build package
run: python -m build

- name: Publish package
uses: pypa/gh-action-pypi-publish@release/v1
# Double check that versions match
if: ${{ env.git_tag == env.pypi_version }}
with:
user: __token__
password: ${{ secrets.PYPI_TOKEN }}
2 changes: 0 additions & 2 deletions MANIFEST.in

This file was deleted.

1 change: 1 addition & 0 deletions module_usage_example.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import random
import sys

# pip install SenseLink
from senselink import SenseLink

root = logging.getLogger()
Expand Down
8 changes: 1 addition & 7 deletions senselink/__init__.py
Original file line number Diff line number Diff line change
@@ -1,7 +1 @@
from senselink.senselink import SenseLink
from senselink.data_source import *
from senselink.plug_instance import *
from senselink.tplink_encryption import *

from . import _version
__version__ = _version.get_versions()['version']
from .senselink import SenseLink
Loading

0 comments on commit 9884b20

Please sign in to comment.