1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66
|
#!/usr/bin/env python
import os
import re
import sys
from setuptools import setup
here = os.path.dirname(__file__)
README = open(os.path.join(here, 'README.rst')).read()
def _read_version():
with open(os.path.join(here, 'bme280', '__init__.py')) as code:
contents = code.read()
match = re.search(r'__version__\s*=\s*["\'](.*?)["\']', contents)
return match.group(1)
needs_pytest = {'pytest', 'test', 'ptr'}.intersection(sys.argv)
pytest_runner = ['pytest-runner'] if needs_pytest else []
test_deps = [
'mock;python_version<"3.3"',
'pytest>=3.1',
'pytest-cov'
]
version = _read_version()
setup(
name="RPi.bme280",
version=version,
author="Richard Hull",
author_email="richard.hull@destructuring-bind.org",
description="A library to drive a Bosch BME280 temperature, humidity, pressure sensor over I2C",
long_description=README,
license="MIT",
keywords=["raspberry pi", "orange pi", "banana pi", "rpi", "bosch", "BME280", "i2c", "temperature", "humidity", "pressure"],
url="https://github.com/rm-hull/bme280",
download_url="https://github.com/rm-hull/bme280/tarball/" + version,
packages=['bme280'],
install_requires=["pytz", "smbus2"],
setup_requires=pytest_runner,
tests_require=test_deps,
extras_require={
'qa': [
'rstcheck',
'flake8'
],
'test': test_deps
},
classifiers=[
"License :: OSI Approved :: MIT License",
"Development Status :: 4 - Beta",
"Intended Audience :: Education",
"Intended Audience :: Developers",
"Topic :: Education",
"Topic :: System :: Hardware",
"Programming Language :: Python :: 2",
"Programming Language :: Python :: 2.7",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.4",
"Programming Language :: Python :: 3.5",
"Programming Language :: Python :: 3.6"
]
)
|