forked from aesara-devs/aesara
-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.py
executable file
·38 lines (25 loc) · 861 Bytes
/
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
#!/usr/bin/env python
import os
from setuptools import setup
from setuptools.dist import Distribution
import versioneer
dist = Distribution()
dist.parse_config_files()
NAME: str = dist.get_name() # type: ignore
# Handle builds of nightly release
if "BUILD_AESARA_NIGHTLY" in os.environ:
NAME += "-nightly"
from versioneer import get_versions as original_get_versions
def get_versions():
from datetime import datetime, timezone
suffix = datetime.now(timezone.utc).strftime(r".dev%Y%m%d")
versions = original_get_versions()
versions["version"] = versions["version"].split("+")[0] + suffix
return versions
versioneer.get_versions = get_versions
if __name__ == "__main__":
setup(
name=NAME,
version=versioneer.get_version(),
cmdclass=versioneer.get_cmdclass(),
)