-
Notifications
You must be signed in to change notification settings - Fork 2
/
setup.py
75 lines (59 loc) · 2.22 KB
/
setup.py
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
67
68
69
70
71
72
73
74
75
"""A setuptools based setup module.
See:
https://packaging.python.org/en/latest/distributing.html
https://github.com/pypa/sampleproject
"""
from io import open
from setuptools import find_packages
from setuptools import setup
from setuptools.command.install import install
import os
import sys
here = os.path.abspath(os.path.dirname(__file__))
# Get the long description from the README file
with open(os.path.join(here, "README.md"), encoding="utf-8") as f:
long_description = f.read()
with open(os.path.join(here, "CHANGELOG.md"), encoding="utf-8") as f:
long_description += "\n\n" + f.read()
VERSION = "0.13.0"
class VerifyVersionCommand(install):
"""Custom command to verify that the git tag matches our version.
Taken from https://circleci.com/blog/continuously-deploying-python-packages-to-pypi-with-circleci/
"""
description = "verify that the git tag matches our version"
def run(self): # noqa: D102
tag = os.getenv("CIRCLE_TAG")
if tag != VERSION:
info = "Git tag: {0} does not match the version of this app: {1}".format(
tag, VERSION
)
sys.exit(info)
setup(
name="pyramid_mixpanel",
version=VERSION,
description="Opinionated Pyramid integration with Mixpanel, a user behavioural analytics platform and CRM.",
long_description=long_description,
license="MIT",
long_description_content_type="text/markdown",
url="https://github.com/teamniteo/pyramid_mixpanel",
author="Niteo",
author_email="[email protected]",
classifiers=[
"Development Status :: 4 - Beta",
"Framework :: Pyramid",
"Intended Audience :: Developers",
"License :: OSI Approved :: MIT License",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.7",
"Topic :: Internet :: WWW/HTTP",
"Topic :: Software Development :: Libraries :: Python Modules",
],
keywords="pyramid mixpanel pylons web",
packages=find_packages(exclude=["tests"]),
include_package_data=True,
install_requires=["pyramid", "requests", "mixpanel", "customerio"],
extras_require={
"customerio": ["customerio"],
},
cmdclass={"verify": VerifyVersionCommand},
)