Skip to content

Commit

Permalink
Merge pull request #20 from rveachkc/develop
Browse files Browse the repository at this point in the history
tag 0.1.5
  • Loading branch information
rveachkc authored Nov 2, 2018
2 parents 971bbfa + aba3674 commit 466217f
Show file tree
Hide file tree
Showing 3 changed files with 146 additions and 12 deletions.
84 changes: 84 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
# Python CircleCI 2.0 configuration file
#
# Check https://circleci.com/docs/2.0/language-python/ for more details
#
version: 2
jobs:
build:
docker:
- image: circleci/python:3-stretch
working_directory: ~/repo

steps:
- checkout

# Download and cache dependencies
- restore_cache:
keys:
- v1-dependencies-{{ checksum "requirements.txt" }}
# fallback to using the latest cache if no exact match is found
- v1-dependencies-

- run:
name: install dependencies
command: |
python3 -m venv venv
. venv/bin/activate
pip install -r requirements.txt
- save_cache:
paths:
- ./venv
key: v1-dependencies-{{ checksum "requirements.txt" }}

# run tests!
# this example uses Django's built-in test-runner
# other common Python testing frameworks include pytest and nose
# https://pytest.org
# https://nose.readthedocs.io
#- run:
# name: run tests
# command: |
# . venv/bin/activate
# python manage.py test

#- store_artifacts:
# path: test-reports
# destination: test-reports


deploy:
docker:
- image: circleci/python:3-stretch
working_directory: ~/repo

steps:
- checkout

- restore_cache:
key: v1-dependencies-{{ checksum "requirements.txt" }}

- run:
name: verify git tag vs version
command: |
python3 -m venv venv
. venv/bin/activate
python setup.py verify
- run:
name: init .pypirc
command: |
echo -e "[pypi]" >> ~/.pypirc
echo -e "username = rveach" >> ~/.pypirc
echo -e "password = $PYPI_PASSWORD" >> ~/.pypirc
- run:
name: make a source distribution
command: |
python setup.py sdist
- run:
name: upload to pypi
command: |
. venv/bin/activate
twine upload dist/*
1 change: 1 addition & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
twine>=1.12.1
73 changes: 61 additions & 12 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,14 +1,63 @@
from distutils.core import setup
#!/usr/bin/env python

import os
import sys

from setuptools import setup
from setuptools.command.install import install

VERSION = "0.1.5"

def readme():
""" print long description """
with open('README.md') as f:
return r.read()

class VerifyVersionCommand(install):
"""Custom command to verify that the git tag matches our version"""
description = 'verify that the git tag matches our version'

def run(self):
tag = os.getenv('CIRCLE_TAG')

if tag != VERSION:
info = "Git tag: {0} does not match the version of this app: {1}".format(
tag, VERSION
)
sys.exit(info)


setup(
name = 'pymsteams',
packages = ['pymsteams'],
version = '0.1.5',
description = 'Format messages and post to Microsoft Teams.',
author = 'Ryan Veach',
author_email = '[email protected]',
url = 'https://github.com/rveachkc/pymsteams',
download_url = 'https://github.com/rveachkc/pymsteams/archive/0.1.5.tar.gz',
keywords = ['Microsoft', 'Teams'], # arbitrary keywords
classifiers = [],
install_requires=['requests'],
name="pymsteams",
version=VERSION,
description="Format messages and post to Microsoft Teams.",
long_description=readme(),
url="https://github.com/rveachkc/pymsteams",
author="Ryan Veach",
author_email="[email protected]",
license="Apache",
classifiers=[
"Development Status :: 5 - Production/Stable",
"Intended Audience :: Developers",
"Intended Audience :: Information Technology",
"Intended Audience :: System Administrators",
"License :: OSI Approved :: Apache Software License",
"Operating System :: OS Independent",
"Topic :: Software Development :: Libraries :: Python Modules",
"Topic :: Internet",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.6",
"Programming Language :: Python :: 3 :: Only",
"Topic :: Office/Business",
"Topic :: Office/Business :: Groupware",
],
keywords=['Microsoft', 'Teams'],
packages=['pymsteams'],
install_requires=[
'requests==2.18.4',
],
python_requires='>=3',
cmdclass={
'verify': VerifyVersionCommand,
}
)

0 comments on commit 466217f

Please sign in to comment.