forked from greencoder/easysafe-python
-
Notifications
You must be signed in to change notification settings - Fork 35
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Deleted old layout * New layout in place
- Loading branch information
Showing
16 changed files
with
162 additions
and
87 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 |
---|---|---|
@@ -1,37 +1,2 @@ | ||
*.py[cod] | ||
|
||
test.py | ||
|
||
# C extensions | ||
*.so | ||
|
||
# Packages | ||
*.egg | ||
*.egg-info | ||
dist | ||
build | ||
eggs | ||
parts | ||
bin | ||
var | ||
sdist | ||
develop-eggs | ||
.installed.cfg | ||
lib | ||
lib64 | ||
|
||
# Installer logs | ||
pip-log.txt | ||
|
||
# Unit test / coverage reports | ||
.coverage | ||
.tox | ||
nosetests.xml | ||
|
||
# Translations | ||
*.mo | ||
|
||
# Mr Developer | ||
.mr.developer.cfg | ||
.project | ||
.pydevproject | ||
.mypy_cache | ||
Pipfile.lock |
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
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,11 @@ | ||
init: | ||
pip install --upgrade pip pipenv | ||
pipenv lock | ||
pipenv install --dev | ||
lint: | ||
pipenv run flake8 simplisafe-python | ||
pipenv run pydocstyle simplisafe-python | ||
publish: | ||
python setup.py sdist bdist_wheel | ||
pipenv run twine upload dist/* | ||
rm -rf dist/ build/ .egg simplisafe-python.egg-info/ |
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,16 @@ | ||
[[source]] | ||
|
||
url = "https://pypi.python.org/simple" | ||
verify_ssl = true | ||
|
||
|
||
[dev-packages] | ||
|
||
"flake8" = "*" | ||
pydocstyle = "*" | ||
tox = "*" | ||
twine = "*" | ||
|
||
[packages] | ||
|
||
requests = "*" |
This file was deleted.
Oops, something went wrong.
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,130 @@ | ||
#!/usr/bin/env python | ||
# -*- coding: utf-8 -*- | ||
|
||
"""Define publication options.""" | ||
|
||
# Note: To use the 'upload' functionality of this file, you must: | ||
# $ pip install twine | ||
|
||
import io | ||
import os | ||
import sys | ||
from shutil import rmtree | ||
|
||
from setuptools import find_packages, setup, Command # type: ignore | ||
|
||
# Package meta-data. | ||
NAME = 'simplisafe-python' | ||
DESCRIPTION = 'A unofficial Python 3 library for SimpliSafe alarm systems' | ||
URL = 'https://github.com/w1ll1am23/simplisafe-python' | ||
EMAIL = '' | ||
AUTHOR = 'William Scanlon' | ||
REQUIRES_PYTHON = '>=3.5.0' | ||
VERSION = None | ||
|
||
# What packages are required for this module to be executed? | ||
REQUIRED = [ # type: ignore | ||
'requests>=2.0' | ||
] | ||
|
||
# The rest you shouldn't have to touch too much :) | ||
# ------------------------------------------------ | ||
# Except, perhaps the License and Trove Classifiers! | ||
# If you do change the License, remember to change the Trove Classifier for | ||
# that! | ||
|
||
HERE = os.path.abspath(os.path.dirname(__file__)) | ||
|
||
# Import the README and use it as the long-description. | ||
# Note: this will only work if 'README.md' is present in your MANIFEST.in file! | ||
with io.open(os.path.join(HERE, 'README.rst'), encoding='utf-8') as f: | ||
LONG_DESC = '\n' + f.read() | ||
|
||
# Load the package's __version__.py module as a dictionary. | ||
ABOUT = {} # type: ignore | ||
if not VERSION: | ||
with open(os.path.join(HERE, NAME, '__version__.py')) as f: | ||
exec(f.read(), ABOUT) # pylint: disable=exec-used | ||
else: | ||
ABOUT['__version__'] = VERSION | ||
|
||
|
||
class UploadCommand(Command): | ||
"""Support setup.py upload.""" | ||
|
||
description = 'Build and publish the package.' | ||
user_options = [] # type: ignore | ||
|
||
@staticmethod | ||
def status(string): | ||
"""Prints things in bold.""" | ||
print('\033[1m{0}\033[0m'.format(string)) | ||
|
||
def initialize_options(self): | ||
"""Add options for initialization.""" | ||
pass | ||
|
||
def finalize_options(self): | ||
"""Add options for finalization.""" | ||
pass | ||
|
||
def run(self): | ||
"""Run.""" | ||
try: | ||
self.status('Removing previous builds…') | ||
rmtree(os.path.join(HERE, 'dist')) | ||
except OSError: | ||
pass | ||
|
||
self.status('Building Source and Wheel (universal) distribution…') | ||
os.system('{0} setup.py sdist bdist_wheel --universal'.format( | ||
sys.executable)) | ||
|
||
self.status('Uploading the package to PyPi via Twine…') | ||
os.system('twine upload dist/*') | ||
|
||
self.status('Pushing git tags…') | ||
os.system('git tag v{0}'.format(ABOUT['__version__'])) | ||
os.system('git push --tags') | ||
|
||
sys.exit() | ||
|
||
|
||
# Where the magic happens: | ||
setup( | ||
name=NAME, | ||
version=ABOUT['__version__'], | ||
description=DESCRIPTION, | ||
long_description=LONG_DESC, | ||
long_description_content_type='text/markdown', | ||
author=AUTHOR, | ||
# author_email=EMAIL, | ||
python_requires=REQUIRES_PYTHON, | ||
url=URL, | ||
packages=find_packages(exclude=('tests',)), | ||
# If your package is a single module, use this instead of 'packages': | ||
# py_modules=['mypackage'], | ||
|
||
# entry_points={ | ||
# 'console_scripts': ['mycli=mymodule:cli'], | ||
# }, | ||
install_requires=REQUIRED, | ||
include_package_data=True, | ||
license='MIT', | ||
classifiers=[ | ||
# Trove classifiers | ||
# Full list: https://pypi.python.org/pypi?%3Aaction=list_classifiers | ||
'License :: OSI Approved :: MIT License', | ||
'Programming Language :: Python', | ||
'Programming Language :: Python :: 3', | ||
'Programming Language :: Python :: 3.5', | ||
'Programming Language :: Python :: 3.6', | ||
'Programming Language :: Python :: 3.7', | ||
'Programming Language :: Python :: Implementation :: CPython', | ||
'Programming Language :: Python :: Implementation :: PyPy' | ||
], | ||
# $ setup.py publish support. | ||
cmdclass={ | ||
'upload': UploadCommand, | ||
}, | ||
) |
File renamed without changes.
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,2 @@ | ||
"""Define a version constant.""" | ||
__version__ = '2.0.2' |
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file was deleted.
Oops, something went wrong.
Empty file.