mirror of
https://github.com/cmur2/python-bme280.git
synced 2024-11-18 10:56:16 +01:00
module: adopt poetry dependency manager
This commit is contained in:
parent
931f5ff229
commit
e36c38d950
3
.gitignore
vendored
3
.gitignore
vendored
@ -1,4 +1,5 @@
|
||||
.pytest_cache/
|
||||
__pycache__/
|
||||
*.egg-info/
|
||||
*.py[cod]
|
||||
Pipfile.lock
|
||||
poetry.lock
|
||||
|
19
.travis.yml
19
.travis.yml
@ -8,21 +8,10 @@ python:
|
||||
- "3.7"
|
||||
- "3.8"
|
||||
|
||||
jobs:
|
||||
fast_finish: true
|
||||
allow_failures:
|
||||
- python: "3.4"
|
||||
- python: "3.5"
|
||||
- python: "3.7"
|
||||
- python: "3.8"
|
||||
|
||||
env:
|
||||
- PIPENV_VERBOSITY=-1
|
||||
|
||||
install:
|
||||
- pip install --upgrade pipenv
|
||||
- pipenv install --dev
|
||||
- pip install poetry
|
||||
- poetry install
|
||||
|
||||
script:
|
||||
- pylint bme280
|
||||
- pytest
|
||||
- poetry run pylint bme280
|
||||
- poetry run pytest
|
||||
|
14
Pipfile
14
Pipfile
@ -1,14 +0,0 @@
|
||||
[[source]]
|
||||
url = 'https://pypi.python.org/simple'
|
||||
|
||||
[requires]
|
||||
python_version = '2.7'
|
||||
|
||||
[packages]
|
||||
smbus2 = '*'
|
||||
|
||||
[dev-packages]
|
||||
mock = '*'
|
||||
pylint = '< 2'
|
||||
pytest = '< 5'
|
||||
snapshottest = '*'
|
@ -52,7 +52,7 @@ FILTER_4 = 0x02
|
||||
FILTER_8 = 0x03
|
||||
FILTER_16 = 0x04 # and all higher
|
||||
|
||||
class Bme280(object):
|
||||
class Bme280(object): # pylint: disable=bad-option-value,useless-object-inheritance
|
||||
|
||||
def __init__(self, i2c_bus=1, sensor_address=ADDR):
|
||||
self.bus = smbus.SMBus(i2c_bus)
|
||||
|
23
pyproject.toml
Normal file
23
pyproject.toml
Normal file
@ -0,0 +1,23 @@
|
||||
[build-system]
|
||||
requires = ["poetry>=1.0"]
|
||||
build-backend = "poetry.masonry.api"
|
||||
|
||||
[tool.poetry]
|
||||
name = "bme280"
|
||||
version = "1.0.0"
|
||||
description = "A python library for accessing the BME280 combined humidity and pressure sensor from Bosch."
|
||||
authors = ["Christian Nicolai"]
|
||||
license = "MIT"
|
||||
homepage = "https://dev.mycrobase.de/gitea/cn/python-bme280"
|
||||
|
||||
[tool.poetry.dependencies]
|
||||
python = "^2.7 || ^3.4"
|
||||
smbus2 = "*"
|
||||
|
||||
[tool.poetry.dev-dependencies]
|
||||
mock = "*"
|
||||
pylint = "*"
|
||||
pytest = "*"
|
||||
snapshottest = "*"
|
||||
rope = "*"
|
||||
yapf = "*"
|
13
setup.py
13
setup.py
@ -1,13 +0,0 @@
|
||||
from setuptools import setup
|
||||
|
||||
setup(name='bme280',
|
||||
version='1.0.0',
|
||||
packages=['bme280'],
|
||||
|
||||
install_requires=['smbus2'],
|
||||
python_requires='>=2.7',
|
||||
|
||||
url='https://dev.mycrobase.de/gitea/cn/python-bme280',
|
||||
author='Christian Nicolai',
|
||||
description='A python library for accessing the BME280 combined humidity and pressure sensor from Bosch.',
|
||||
long_description=open('README.md').read())
|
Loading…
Reference in New Issue
Block a user