File tree Expand file tree Collapse file tree 2 files changed +48
-0
lines changed Expand file tree Collapse file tree 2 files changed +48
-0
lines changed Original file line number Diff line number Diff line change
1
+ name : Nightly
2
+ on :
3
+ schedule :
4
+ - cron : " 0 0 * * *"
5
+
6
+ jobs :
7
+ build_and_publish :
8
+ name : Build source distribution
9
+ runs-on : ubuntu-latest
10
+ steps :
11
+ - uses : actions/checkout@v2
12
+ with :
13
+ fetch-depth : 0
14
+ - uses : actions/setup-python@v2
15
+ with :
16
+ python-version : " 3.9"
17
+ - name : Install dependencies
18
+ run : |
19
+ python -m pip install -U pip
20
+ python -m pip install build
21
+ - name : Build the sdist
22
+ run : python -m build --sdist .
23
+ env :
24
+ BUILD_AESARA_NIGHTLY : true
25
+
26
+ with :
27
+ user : __token__
28
+ password : ${{ secrets.nightly_pypi_secret }}
Original file line number Diff line number Diff line change 1
1
#!/usr/bin/env python
2
+ import os
2
3
import sys
3
4
4
5
from setuptools import find_packages , setup
@@ -59,13 +60,32 @@ def read_file(filename):
59
60
if sys .version_info [0 :2 ] < (3 , 7 ):
60
61
install_requires += ["dataclasses" ]
61
62
63
+ # Handle builds of nightly release
64
+ if "BUILD_AESARA_NIGHTLY" in os .environ :
65
+ nightly = True
66
+ NAME += "-nightly"
67
+
68
+ from versioneer import get_versions as original_get_versions
69
+
70
+ def get_versions ():
71
+ from datetime import datetime , timezone
72
+
73
+ suffix = datetime .now (timezone .utc ).strftime (r".dev%Y%m%d" )
74
+ versions = original_get_versions ()
75
+ versions ["version" ] = versions ["version" ].split ("+" )[0 ] + suffix
76
+ return versions
77
+
78
+ versioneer .get_versions = get_versions
79
+
80
+
62
81
if __name__ == "__main__" :
63
82
setup (
64
83
name = NAME ,
65
84
version = versioneer .get_version (),
66
85
cmdclass = versioneer .get_cmdclass (),
67
86
description = DESCRIPTION ,
68
87
long_description = LONG_DESCRIPTION ,
88
+ long_description_content_type = "text/x-rst" ,
69
89
classifiers = CLASSIFIERS ,
70
90
author = AUTHOR ,
71
91
author_email = AUTHOR_EMAIL ,
You can’t perform that action at this time.
0 commit comments