Skip to content

Commit

Permalink
Improving PyPi distribution (build sdist and bdist_wheel).
Browse files Browse the repository at this point in the history
Package now knows and logs it's version.
  • Loading branch information
yozik04 committed Jan 6, 2020
1 parent db9842e commit 42e937d
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 7 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ script: python setup.py test
deploy:
provider: pypi
user: __token__
distributions: sdist
distributions: "sdist bdist_wheel"
skip_existing: true
on:
tags: true
Expand Down
3 changes: 3 additions & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
include README.md
include LICENSE
include requirements.txt
1 change: 1 addition & 0 deletions paradox/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
VERSION='1.5.0-dev'
7 changes: 4 additions & 3 deletions paradox/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import time
import signal

from paradox import VERSION
from paradox.config import config as cfg


Expand Down Expand Up @@ -73,10 +74,10 @@ def main(args):

config_logger(logger)

logger.info("Config loaded from %s", cfg.CONFIG_FILE_LOCATION)
logger.info(f"Starting Paradox Alarm Interface {VERSION}")
logger.info(f"Config loaded from {cfg.CONFIG_FILE_LOCATION}")

logger.info("Starting Paradox Alarm Interface")
logger.info("Console Log level set to {}".format(cfg.LOGGING_LEVEL_CONSOLE))
logger.info(f"Console Log level set to {cfg.LOGGING_LEVEL_CONSOLE}")

interface_manager = InterfaceManager(config=cfg)
interface_manager.start()
Expand Down
8 changes: 5 additions & 3 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
import sys
from setuptools import setup, find_packages

from paradox import VERSION

needs_pytest = {'pytest', 'test', 'ptr'}.intersection(sys.argv)
pytest_runner = ['pytest-runner'] if needs_pytest else []

Expand All @@ -11,21 +13,21 @@

setup(
name='paradox-alarm-interface',
version='1.2.0',
version=VERSION,
author='João Paulo Barraca',
author_email='[email protected]',
description='Interface to Paradox Alarm Panels',
long_description=long_description,
long_description_content_type='text/markdown',
url='https://github.com/ParadoxAlarmInterface/pai',
download_url='https://github.com/ParadoxAlarmInterface/pai/archive/1.1.0.tar.gz',
download_url=f'https://github.com/ParadoxAlarmInterface/pai/archive/{VERSION}.tar.gz',
packages=find_packages(exclude=['tests', 'tests.*', 'config.*', 'docs.*']),
install_requires=[
'construct >= 2.9.43',
'argparse >= 1.4.0'
],
python_requires='>=3.6',
setup_requires=[] + pytest_runner,
setup_requires=['wheel'] + pytest_runner,
tests_require=[
'pytest',
'pytest-asyncio',
Expand Down

0 comments on commit 42e937d

Please sign in to comment.