15
15
# Configure setuptools_scm to build a custom version (for more info,
16
16
# see https://stackoverflow.com/a/78657279 and https://setuptools-scm.readthedocs.io/en/latest/extending)
17
17
# If on a clean release, it uses no local scheme
18
- # Otherwise, it uses g{commit hash}.{branch}.[clean | d{date}] for the local scheme,
19
- # where the last entry is "clean " if everything is committed and otherwise the date of last commit
18
+ # Otherwise, it uses g{commit hash}.{branch}.[CLEAN | d{date}] for the local scheme,
19
+ # where the last entry is "CLEAN " if everything is committed and otherwise the date of last commit
20
20
def custom_version (version ):
21
21
from setuptools_scm .version import get_local_node_and_date
22
22
23
- b = version .branch if version .branch and version .branch != "master" else None
24
-
25
23
local_scheme = ""
26
24
if version .dirty or version .distance :
27
25
node_and_date = get_local_node_and_date (version )
@@ -30,11 +28,9 @@ def custom_version(version):
30
28
node , date = node_and_date .split ('.' )
31
29
else :
32
30
node = node_and_date
33
- date = "clean "
31
+ date = "CLEAN "
34
32
35
- local_scheme = node + (f'.{ b } .' if b else 'master' ) + date
36
- elif b :
37
- local_scheme = f"+{ b } "
33
+ local_scheme = node + f'.{ version .branch } .' + date
38
34
39
35
return local_scheme
40
36
@@ -65,7 +61,7 @@ def setup_with_extensions(extensions=None):
65
61
use_scm_version = {'version_scheme' : 'no-guess-dev' , 'version_file' : "pygsti/_version.py" , 'local_scheme' : custom_version },
66
62
cmdclass = {'build_ext' : build_ext_compiler_check },
67
63
ext_modules = extensions or [],
68
- packages = find_packages (),
64
+ packages = find_packages (where = '.' , include = [ 'pygsti' ] ),
69
65
package_data = {
70
66
'pygsti.tools' : ['fastcalc.pyx' ],
71
67
'pygsti.evotypes' : [
0 commit comments