Skip to content

Commit b32c914

Browse files
committed
scaffold
1 parent bd0f318 commit b32c914

File tree

4 files changed

+98
-0
lines changed

4 files changed

+98
-0
lines changed

.gitignore

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,3 +102,19 @@ venv.bak/
102102

103103
# mypy
104104
.mypy_cache/
105+
106+
# pycharm
107+
.idea/
108+
109+
# visual studio code
110+
.vscode/
111+
112+
# environment variables
113+
.env
114+
115+
# envrc
116+
.envrc
117+
118+
# others
119+
.DS_Store
120+

Makefile

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
SHELL := bash
2+
PATH := ./venv/bin:${PATH}
3+
PYTHON=python3.7
4+
PROJECT=cep
5+
6+
7+
all: test
8+
9+
venv:
10+
$(PYTHON) -m venv --prompt $(PROJECT) venv
11+
pip install -qU pip
12+
13+
install-test:
14+
pip install -q .[test]
15+
16+
test: clean install-test lint
17+
python setup.py test
18+
19+
polish:
20+
black -S -l 79 **/*.py
21+
isort -rc --atomic **/*.py
22+
23+
lint:
24+
pycodestyle setup.py $(PROJECT)/ tests/
25+
26+
clean:
27+
find . -name '*.pyc' -exec rm -f {} +
28+
find . -name '*.pyo' -exec rm -f {} +
29+
find . -name '*~' -exec rm -f {} +
30+
rm -rf build dist $(PROJECT).egg-info
31+
32+
release: clean
33+
python setup.py sdist bdist_wheel
34+
twine upload dist/*
35+
36+
37+
.PHONY: all install-test release test clean-pyc

cep/__init__.py

Whitespace-only changes.

setup.py

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
import setuptools
2+
3+
install_requirements = [
4+
'requests>=2.21.0,<2.22.0',
5+
'iso8601>=0.1.12,<0.2.0',
6+
]
7+
8+
# dataclasses is currently only builtin for 3.7. There is a backport on PyPi.
9+
# There may be an official backport in the future, which is why we don't just
10+
# check the python version.
11+
try:
12+
import dataclasses
13+
except ModuleNotFoundError:
14+
install_requirements.append('dataclasses')
15+
16+
test_requires = ['pytest', 'pytest-vcr', 'pycodestyle', 'pytest-cov',
17+
'black', 'isort[pipfile]']
18+
19+
with open('README.md', 'r') as f:
20+
long_description = f.read()
21+
22+
23+
setuptools.setup(
24+
name='cepmex',
25+
version='0.0.1',
26+
author='Cuenca',
27+
author_email='[email protected]',
28+
description='CEP client library',
29+
long_description=long_description,
30+
long_description_content_type='text/markdown',
31+
url='https://github.com/cuenca-mx/cep-python',
32+
packages=setuptools.find_packages(),
33+
python_requires='>=3.6',
34+
install_requires=install_requirements,
35+
setup_requires=['pytest-runner'],
36+
tests_require=test_requires,
37+
extras_require=dict(test=test_requires),
38+
classifiers=[
39+
'Programming Language :: Python :: 3',
40+
'Programming Language :: Python :: 3.6',
41+
'Programming Language :: Python :: 3.7',
42+
'License :: OSI Approved :: MIT License',
43+
'Operating System :: OS Independent',
44+
]
45+
)

0 commit comments

Comments
 (0)