This repository has been archived by the owner on Nov 11, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 116
/
setup.py
50 lines (40 loc) · 1.46 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
from setuptools import find_packages, setup
from setuptools.command.install import install
import os
this_directory = os.path.abspath(os.path.dirname(__file__))
with open(os.path.join(this_directory, "README.md")) as f:
long_description = f.read()
package_name = "dbt-init"
VERSION = "0.3.0"
description = """Create a dbt project the way Fishtown Analytics would"""
class VerifyVersionCommand(install):
"""
Custom command to verify that the git tag matches our version
https://circleci.com/blog/continuously-deploying-python-packages-to-pypi-with-circleci/
"""
description = "verify that the git tag matches our version"
def run(self):
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=package_name,
version=VERSION,
description=description,
long_description=long_description,
long_description_content_type="text/markdown",
author="Claire Carroll",
author_email="claire@fishtownanalytics.com",
url="https://github.com/fishtown-analyics/dbt-init",
packages=find_packages(),
package_data={"": ["starter-project/**/*"]},
include_package_data=True,
test_suite="test",
entry_points={"console_scripts": ["dbt-init = core.main:main"]},
scripts=[],
install_requires=["jinja2"],
cmdclass={"verify": VerifyVersionCommand},
)