annotate setup.py @ 747:95d3239bec73

FIX: Root-Is-PureLib: false installs into "purelib" but should install into "platlib". Overwrite also the "install" command.
author Franz Glasner <f.glasner@feldmann-mg.com>
date Mon, 30 Oct 2023 15:46:13 +0100
parents 7b3c3a89f720
children c27d0812b30d
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
53ea2bc254e7 Begin a package to abstract some of the important configuration handling stuff.
Franz Glasner <hg@dom66.de>
parents:
diff changeset
1 #!/usr/bin/env python
53ea2bc254e7 Begin a package to abstract some of the important configuration handling stuff.
Franz Glasner <hg@dom66.de>
parents:
diff changeset
2 # -*- coding: utf-8 -*-
587
eac8e2d3933c Add a comment about extra arguments to setup.py
Franz Glasner <fzglas.hg@dom66.de>
parents: 586
diff changeset
3 """Extra custom params:
eac8e2d3933c Add a comment about extra arguments to setup.py
Franz Glasner <fzglas.hg@dom66.de>
parents: 586
diff changeset
4
eac8e2d3933c Add a comment about extra arguments to setup.py
Franz Glasner <fzglas.hg@dom66.de>
parents: 586
diff changeset
5 --only-pure Build a pure-Python Wheel
eac8e2d3933c Add a comment about extra arguments to setup.py
Franz Glasner <fzglas.hg@dom66.de>
parents: 586
diff changeset
6 --windows-cross-pack Pack with a pre-built Windows "_speedups.pyd".
eac8e2d3933c Add a comment about extra arguments to setup.py
Franz Glasner <fzglas.hg@dom66.de>
parents: 586
diff changeset
7 Most likely "-p win_amd64" is needed also.
eac8e2d3933c Add a comment about extra arguments to setup.py
Franz Glasner <fzglas.hg@dom66.de>
parents: 586
diff changeset
8
eac8e2d3933c Add a comment about extra arguments to setup.py
Franz Glasner <fzglas.hg@dom66.de>
parents: 586
diff changeset
9 """
0
53ea2bc254e7 Begin a package to abstract some of the important configuration handling stuff.
Franz Glasner <hg@dom66.de>
parents:
diff changeset
10
585
233bd8bbda28 Automatically remove ConfigMix.egg-info
Franz Glasner <fzglas.hg@dom66.de>
parents: 583
diff changeset
11 from __future__ import print_function, absolute_import
233bd8bbda28 Automatically remove ConfigMix.egg-info
Franz Glasner <fzglas.hg@dom66.de>
parents: 583
diff changeset
12
0
53ea2bc254e7 Begin a package to abstract some of the important configuration handling stuff.
Franz Glasner <hg@dom66.de>
parents:
diff changeset
13 import re
53ea2bc254e7 Begin a package to abstract some of the important configuration handling stuff.
Franz Glasner <hg@dom66.de>
parents:
diff changeset
14 import os
542
f71d34dda19f Add an optional C-implementation for configmix.config.unquote and configmix.config.pathstr2path.
Franz Glasner <fzglas.hg@dom66.de>
parents: 296
diff changeset
15 import platform
585
233bd8bbda28 Automatically remove ConfigMix.egg-info
Franz Glasner <fzglas.hg@dom66.de>
parents: 583
diff changeset
16 import shutil
0
53ea2bc254e7 Begin a package to abstract some of the important configuration handling stuff.
Franz Glasner <hg@dom66.de>
parents:
diff changeset
17 import sys
53ea2bc254e7 Begin a package to abstract some of the important configuration handling stuff.
Franz Glasner <hg@dom66.de>
parents:
diff changeset
18 try:
53ea2bc254e7 Begin a package to abstract some of the important configuration handling stuff.
Franz Glasner <hg@dom66.de>
parents:
diff changeset
19 from setuptools import setup
53ea2bc254e7 Begin a package to abstract some of the important configuration handling stuff.
Franz Glasner <hg@dom66.de>
parents:
diff changeset
20 except ImportError:
53ea2bc254e7 Begin a package to abstract some of the important configuration handling stuff.
Franz Glasner <hg@dom66.de>
parents:
diff changeset
21 from distutils.core import setup
53ea2bc254e7 Begin a package to abstract some of the important configuration handling stuff.
Franz Glasner <hg@dom66.de>
parents:
diff changeset
22
53ea2bc254e7 Begin a package to abstract some of the important configuration handling stuff.
Franz Glasner <hg@dom66.de>
parents:
diff changeset
23
582
0467b3ae34ea setup.py: Put the official projectname into a variable and re-use
Franz Glasner <fzglas.hg@dom66.de>
parents: 577
diff changeset
24 PROJECT_NAME = "ConfigMix"
0467b3ae34ea setup.py: Put the official projectname into a variable and re-use
Franz Glasner <fzglas.hg@dom66.de>
parents: 577
diff changeset
25
0467b3ae34ea setup.py: Put the official projectname into a variable and re-use
Franz Glasner <fzglas.hg@dom66.de>
parents: 577
diff changeset
26
0
53ea2bc254e7 Begin a package to abstract some of the important configuration handling stuff.
Franz Glasner <hg@dom66.de>
parents:
diff changeset
27 if (sys.version_info[0] < 2) or \
53ea2bc254e7 Begin a package to abstract some of the important configuration handling stuff.
Franz Glasner <hg@dom66.de>
parents:
diff changeset
28 ((sys.version_info[0] == 2) and (sys.version_info[1] < 6)):
53ea2bc254e7 Begin a package to abstract some of the important configuration handling stuff.
Franz Glasner <hg@dom66.de>
parents:
diff changeset
29 raise ValueError("Need at least Python 2.6")
53ea2bc254e7 Begin a package to abstract some of the important configuration handling stuff.
Franz Glasner <hg@dom66.de>
parents:
diff changeset
30
53ea2bc254e7 Begin a package to abstract some of the important configuration handling stuff.
Franz Glasner <hg@dom66.de>
parents:
diff changeset
31 pkg_root = os.path.dirname(__file__)
53ea2bc254e7 Begin a package to abstract some of the important configuration handling stuff.
Franz Glasner <hg@dom66.de>
parents:
diff changeset
32
53ea2bc254e7 Begin a package to abstract some of the important configuration handling stuff.
Franz Glasner <hg@dom66.de>
parents:
diff changeset
33 _version_re = re.compile(br"^\s*__version__\s*=\s*(\"|')(.*)\1\s*(#.*)?$",
53ea2bc254e7 Begin a package to abstract some of the important configuration handling stuff.
Franz Glasner <hg@dom66.de>
parents:
diff changeset
34 re.MULTILINE)
53ea2bc254e7 Begin a package to abstract some of the important configuration handling stuff.
Franz Glasner <hg@dom66.de>
parents:
diff changeset
35
5
dc058099a4cb Renamed the project from "MixConfig" to "ConfigMix"
Franz Glasner <hg@dom66.de>
parents: 4
diff changeset
36 with open(os.path.join(pkg_root, "configmix", "__init__.py"), "rb") as vf:
0
53ea2bc254e7 Begin a package to abstract some of the important configuration handling stuff.
Franz Glasner <hg@dom66.de>
parents:
diff changeset
37 version = _version_re.search(vf.read()).group(2).decode("utf-8")
53ea2bc254e7 Begin a package to abstract some of the important configuration handling stuff.
Franz Glasner <hg@dom66.de>
parents:
diff changeset
38
71
80dcb41928a7 Rename README to README.txt to be more consistent with LICENSE.txt
Franz Glasner <hg@dom66.de>
parents: 70
diff changeset
39 with open(os.path.join(pkg_root, "README.txt"), "rt") as rf:
0
53ea2bc254e7 Begin a package to abstract some of the important configuration handling stuff.
Franz Glasner <hg@dom66.de>
parents:
diff changeset
40 long_description = rf.read()
53ea2bc254e7 Begin a package to abstract some of the important configuration handling stuff.
Franz Glasner <hg@dom66.de>
parents:
diff changeset
41
282
da1596034954 Implemented an "AWS" namespace to retrieve some AWS-specific metadata
Franz Glasner <fzglas.hg@dom66.de>
parents: 277
diff changeset
42 aws_requirements = [
da1596034954 Implemented an "AWS" namespace to retrieve some AWS-specific metadata
Franz Glasner <fzglas.hg@dom66.de>
parents: 277
diff changeset
43 "requests",
da1596034954 Implemented an "AWS" namespace to retrieve some AWS-specific metadata
Franz Glasner <fzglas.hg@dom66.de>
parents: 277
diff changeset
44 ]
da1596034954 Implemented an "AWS" namespace to retrieve some AWS-specific metadata
Franz Glasner <fzglas.hg@dom66.de>
parents: 277
diff changeset
45
184
781b8dc1883f Use the pip "extras" feature to install optional features (e.g. PyYAML)
Franz Glasner <fzglas.hg@dom66.de>
parents: 80
diff changeset
46 yaml_requirements = [
672
453c6e2820d1 Test with PyYAML 6.0: ok.
Franz Glasner <fzglas.hg@dom66.de>
parents: 589
diff changeset
47 "PyYAML>=3.0,<7",
184
781b8dc1883f Use the pip "extras" feature to install optional features (e.g. PyYAML)
Franz Glasner <fzglas.hg@dom66.de>
parents: 80
diff changeset
48 ]
781b8dc1883f Use the pip "extras" feature to install optional features (e.g. PyYAML)
Franz Glasner <fzglas.hg@dom66.de>
parents: 80
diff changeset
49
195
28e6c1413947 Added support for TOML style configuration files
Franz Glasner <fzglas.hg@dom66.de>
parents: 185
diff changeset
50 toml_requirements = [
28e6c1413947 Added support for TOML style configuration files
Franz Glasner <fzglas.hg@dom66.de>
parents: 185
diff changeset
51 "toml>=0.10",
28e6c1413947 Added support for TOML style configuration files
Franz Glasner <fzglas.hg@dom66.de>
parents: 185
diff changeset
52 ]
28e6c1413947 Added support for TOML style configuration files
Franz Glasner <fzglas.hg@dom66.de>
parents: 185
diff changeset
53
687
7b3c3a89f720 Add extra "sasl" because for the "saslprep()" filter passlib.utils is needed
Franz Glasner <fzglas.hg@dom66.de>
parents: 672
diff changeset
54 sasl_requirements = [
7b3c3a89f720 Add extra "sasl" because for the "saslprep()" filter passlib.utils is needed
Franz Glasner <fzglas.hg@dom66.de>
parents: 672
diff changeset
55 "passlib>=1.6",
7b3c3a89f720 Add extra "sasl" because for the "saslprep()" filter passlib.utils is needed
Franz Glasner <fzglas.hg@dom66.de>
parents: 672
diff changeset
56 ]
7b3c3a89f720 Add extra "sasl" because for the "saslprep()" filter passlib.utils is needed
Franz Glasner <fzglas.hg@dom66.de>
parents: 672
diff changeset
57
184
781b8dc1883f Use the pip "extras" feature to install optional features (e.g. PyYAML)
Franz Glasner <fzglas.hg@dom66.de>
parents: 80
diff changeset
58 all_requirements = []
282
da1596034954 Implemented an "AWS" namespace to retrieve some AWS-specific metadata
Franz Glasner <fzglas.hg@dom66.de>
parents: 277
diff changeset
59 all_requirements.extend(aws_requirements)
184
781b8dc1883f Use the pip "extras" feature to install optional features (e.g. PyYAML)
Franz Glasner <fzglas.hg@dom66.de>
parents: 80
diff changeset
60 all_requirements.extend(yaml_requirements)
195
28e6c1413947 Added support for TOML style configuration files
Franz Glasner <fzglas.hg@dom66.de>
parents: 185
diff changeset
61 all_requirements.extend(toml_requirements)
687
7b3c3a89f720 Add extra "sasl" because for the "saslprep()" filter passlib.utils is needed
Franz Glasner <fzglas.hg@dom66.de>
parents: 672
diff changeset
62 all_requirements.extend(sasl_requirements)
184
781b8dc1883f Use the pip "extras" feature to install optional features (e.g. PyYAML)
Franz Glasner <fzglas.hg@dom66.de>
parents: 80
diff changeset
63
542
f71d34dda19f Add an optional C-implementation for configmix.config.unquote and configmix.config.pathstr2path.
Franz Glasner <fzglas.hg@dom66.de>
parents: 296
diff changeset
64
f71d34dda19f Add an optional C-implementation for configmix.config.unquote and configmix.config.pathstr2path.
Franz Glasner <fzglas.hg@dom66.de>
parents: 296
diff changeset
65 cmdclass = {}
575
9ce13f753c04 Allow execution of setup.py by packaging a cross-built Windows _speedups.pyd.
Franz Glasner <fzglas.hg@dom66.de>
parents: 569
diff changeset
66 ext_modules = None
567
059260191371 Tweak setup.py to build packages with pure-Python tags if the extension is not expected to be built (Python 3.4-)
Franz Glasner <fzglas.hg@dom66.de>
parents: 546
diff changeset
67 setup_extra_kwds = {}
542
f71d34dda19f Add an optional C-implementation for configmix.config.unquote and configmix.config.pathstr2path.
Franz Glasner <fzglas.hg@dom66.de>
parents: 296
diff changeset
68
575
9ce13f753c04 Allow execution of setup.py by packaging a cross-built Windows _speedups.pyd.
Franz Glasner <fzglas.hg@dom66.de>
parents: 569
diff changeset
69 windows_cross_pack = False
9ce13f753c04 Allow execution of setup.py by packaging a cross-built Windows _speedups.pyd.
Franz Glasner <fzglas.hg@dom66.de>
parents: 569
diff changeset
70
9ce13f753c04 Allow execution of setup.py by packaging a cross-built Windows _speedups.pyd.
Franz Glasner <fzglas.hg@dom66.de>
parents: 569
diff changeset
71 try:
9ce13f753c04 Allow execution of setup.py by packaging a cross-built Windows _speedups.pyd.
Franz Glasner <fzglas.hg@dom66.de>
parents: 569
diff changeset
72 wcp_idx = sys.argv.index("--windows-cross-pack")
9ce13f753c04 Allow execution of setup.py by packaging a cross-built Windows _speedups.pyd.
Franz Glasner <fzglas.hg@dom66.de>
parents: 569
diff changeset
73 except ValueError:
9ce13f753c04 Allow execution of setup.py by packaging a cross-built Windows _speedups.pyd.
Franz Glasner <fzglas.hg@dom66.de>
parents: 569
diff changeset
74 wcp_idx = None
9ce13f753c04 Allow execution of setup.py by packaging a cross-built Windows _speedups.pyd.
Franz Glasner <fzglas.hg@dom66.de>
parents: 569
diff changeset
75 else:
9ce13f753c04 Allow execution of setup.py by packaging a cross-built Windows _speedups.pyd.
Franz Glasner <fzglas.hg@dom66.de>
parents: 569
diff changeset
76 del sys.argv[wcp_idx]
586
d68e8204f7c3 Allow to build a distribution without C-extensions by using --only-pure
Franz Glasner <fzglas.hg@dom66.de>
parents: 585
diff changeset
77 try:
d68e8204f7c3 Allow to build a distribution without C-extensions by using --only-pure
Franz Glasner <fzglas.hg@dom66.de>
parents: 585
diff changeset
78 pure_only_idx = sys.argv.index("--pure-only")
d68e8204f7c3 Allow to build a distribution without C-extensions by using --only-pure
Franz Glasner <fzglas.hg@dom66.de>
parents: 585
diff changeset
79 except ValueError:
d68e8204f7c3 Allow to build a distribution without C-extensions by using --only-pure
Franz Glasner <fzglas.hg@dom66.de>
parents: 585
diff changeset
80 pure_only_idx = None
d68e8204f7c3 Allow to build a distribution without C-extensions by using --only-pure
Franz Glasner <fzglas.hg@dom66.de>
parents: 585
diff changeset
81 else:
588
Franz Glasner <fzglas.hg@dom66.de>
parents: 587
diff changeset
82 del sys.argv[pure_only_idx]
575
9ce13f753c04 Allow execution of setup.py by packaging a cross-built Windows _speedups.pyd.
Franz Glasner <fzglas.hg@dom66.de>
parents: 569
diff changeset
83
9ce13f753c04 Allow execution of setup.py by packaging a cross-built Windows _speedups.pyd.
Franz Glasner <fzglas.hg@dom66.de>
parents: 569
diff changeset
84
583
4e61df27b4e1 Put the ".egg-info" check into a common location
Franz Glasner <fzglas.hg@dom66.de>
parents: 582
diff changeset
85 #
4e61df27b4e1 Put the ".egg-info" check into a common location
Franz Glasner <fzglas.hg@dom66.de>
parents: 582
diff changeset
86 # Otherwise some cached package_data would be used.
4e61df27b4e1 Put the ".egg-info" check into a common location
Franz Glasner <fzglas.hg@dom66.de>
parents: 582
diff changeset
87 # But our package data differs between "standard" builds and
4e61df27b4e1 Put the ".egg-info" check into a common location
Franz Glasner <fzglas.hg@dom66.de>
parents: 582
diff changeset
88 # builds with "--windows-cross-pack".
4e61df27b4e1 Put the ".egg-info" check into a common location
Franz Glasner <fzglas.hg@dom66.de>
parents: 582
diff changeset
89 #
4e61df27b4e1 Put the ".egg-info" check into a common location
Franz Glasner <fzglas.hg@dom66.de>
parents: 582
diff changeset
90 if os.path.isdir(PROJECT_NAME + ".egg-info"):
585
233bd8bbda28 Automatically remove ConfigMix.egg-info
Franz Glasner <fzglas.hg@dom66.de>
parents: 583
diff changeset
91 print("removing `%s.egg-info'" % (PROJECT_NAME,))
233bd8bbda28 Automatically remove ConfigMix.egg-info
Franz Glasner <fzglas.hg@dom66.de>
parents: 583
diff changeset
92 shutil.rmtree(PROJECT_NAME + ".egg-info")
575
9ce13f753c04 Allow execution of setup.py by packaging a cross-built Windows _speedups.pyd.
Franz Glasner <fzglas.hg@dom66.de>
parents: 569
diff changeset
93
588
Franz Glasner <fzglas.hg@dom66.de>
parents: 587
diff changeset
94 if pure_only_idx is None:
586
d68e8204f7c3 Allow to build a distribution without C-extensions by using --only-pure
Franz Glasner <fzglas.hg@dom66.de>
parents: 585
diff changeset
95 if wcp_idx is None:
d68e8204f7c3 Allow to build a distribution without C-extensions by using --only-pure
Franz Glasner <fzglas.hg@dom66.de>
parents: 585
diff changeset
96 #
588
Franz Glasner <fzglas.hg@dom66.de>
parents: 587
diff changeset
97 # The C-extension uses multi-phase module initialization
Franz Glasner <fzglas.hg@dom66.de>
parents: 587
diff changeset
98 # (PEP 489) which is PY 3.5+.
Franz Glasner <fzglas.hg@dom66.de>
parents: 587
diff changeset
99 #
586
d68e8204f7c3 Allow to build a distribution without C-extensions by using --only-pure
Franz Glasner <fzglas.hg@dom66.de>
parents: 585
diff changeset
100 if (platform.python_implementation() == "CPython"
d68e8204f7c3 Allow to build a distribution without C-extensions by using --only-pure
Franz Glasner <fzglas.hg@dom66.de>
parents: 585
diff changeset
101 and (sys.version_info[0] > 3
d68e8204f7c3 Allow to build a distribution without C-extensions by using --only-pure
Franz Glasner <fzglas.hg@dom66.de>
parents: 585
diff changeset
102 or (sys.version_info[0] == 3 and sys.version_info[1] >= 5))):
575
9ce13f753c04 Allow execution of setup.py by packaging a cross-built Windows _speedups.pyd.
Franz Glasner <fzglas.hg@dom66.de>
parents: 569
diff changeset
103
586
d68e8204f7c3 Allow to build a distribution without C-extensions by using --only-pure
Franz Glasner <fzglas.hg@dom66.de>
parents: 585
diff changeset
104 # The stable API for Python 3.7+ is used
d68e8204f7c3 Allow to build a distribution without C-extensions by using --only-pure
Franz Glasner <fzglas.hg@dom66.de>
parents: 585
diff changeset
105 if sys.version_info[0] == 3 and sys.version_info[1] < 7:
d68e8204f7c3 Allow to build a distribution without C-extensions by using --only-pure
Franz Glasner <fzglas.hg@dom66.de>
parents: 585
diff changeset
106 py_limited_api = False
d68e8204f7c3 Allow to build a distribution without C-extensions by using --only-pure
Franz Glasner <fzglas.hg@dom66.de>
parents: 585
diff changeset
107 else:
d68e8204f7c3 Allow to build a distribution without C-extensions by using --only-pure
Franz Glasner <fzglas.hg@dom66.de>
parents: 585
diff changeset
108 py_limited_api = True
542
f71d34dda19f Add an optional C-implementation for configmix.config.unquote and configmix.config.pathstr2path.
Franz Glasner <fzglas.hg@dom66.de>
parents: 296
diff changeset
109
586
d68e8204f7c3 Allow to build a distribution without C-extensions by using --only-pure
Franz Glasner <fzglas.hg@dom66.de>
parents: 585
diff changeset
110 if py_limited_api:
d68e8204f7c3 Allow to build a distribution without C-extensions by using --only-pure
Franz Glasner <fzglas.hg@dom66.de>
parents: 585
diff changeset
111 define_macros = [("Py_LIMITED_API", "0x03070000")]
d68e8204f7c3 Allow to build a distribution without C-extensions by using --only-pure
Franz Glasner <fzglas.hg@dom66.de>
parents: 585
diff changeset
112 else:
d68e8204f7c3 Allow to build a distribution without C-extensions by using --only-pure
Franz Glasner <fzglas.hg@dom66.de>
parents: 585
diff changeset
113 define_macros = []
d68e8204f7c3 Allow to build a distribution without C-extensions by using --only-pure
Franz Glasner <fzglas.hg@dom66.de>
parents: 585
diff changeset
114
d68e8204f7c3 Allow to build a distribution without C-extensions by using --only-pure
Franz Glasner <fzglas.hg@dom66.de>
parents: 585
diff changeset
115 try:
d68e8204f7c3 Allow to build a distribution without C-extensions by using --only-pure
Franz Glasner <fzglas.hg@dom66.de>
parents: 585
diff changeset
116 from setuptools import Extension
d68e8204f7c3 Allow to build a distribution without C-extensions by using --only-pure
Franz Glasner <fzglas.hg@dom66.de>
parents: 585
diff changeset
117 except ImportError:
d68e8204f7c3 Allow to build a distribution without C-extensions by using --only-pure
Franz Glasner <fzglas.hg@dom66.de>
parents: 585
diff changeset
118 from distutils.core import Extension
575
9ce13f753c04 Allow execution of setup.py by packaging a cross-built Windows _speedups.pyd.
Franz Glasner <fzglas.hg@dom66.de>
parents: 569
diff changeset
119
586
d68e8204f7c3 Allow to build a distribution without C-extensions by using --only-pure
Franz Glasner <fzglas.hg@dom66.de>
parents: 585
diff changeset
120 ext_modules = [
d68e8204f7c3 Allow to build a distribution without C-extensions by using --only-pure
Franz Glasner <fzglas.hg@dom66.de>
parents: 585
diff changeset
121 Extension(
d68e8204f7c3 Allow to build a distribution without C-extensions by using --only-pure
Franz Glasner <fzglas.hg@dom66.de>
parents: 585
diff changeset
122 name="configmix._speedups",
d68e8204f7c3 Allow to build a distribution without C-extensions by using --only-pure
Franz Glasner <fzglas.hg@dom66.de>
parents: 585
diff changeset
123 sources=["configmix/_speedups.c"],
d68e8204f7c3 Allow to build a distribution without C-extensions by using --only-pure
Franz Glasner <fzglas.hg@dom66.de>
parents: 585
diff changeset
124 define_macros=define_macros,
d68e8204f7c3 Allow to build a distribution without C-extensions by using --only-pure
Franz Glasner <fzglas.hg@dom66.de>
parents: 585
diff changeset
125 py_limited_api=py_limited_api,
d68e8204f7c3 Allow to build a distribution without C-extensions by using --only-pure
Franz Glasner <fzglas.hg@dom66.de>
parents: 585
diff changeset
126 optional=True
d68e8204f7c3 Allow to build a distribution without C-extensions by using --only-pure
Franz Glasner <fzglas.hg@dom66.de>
parents: 585
diff changeset
127 ),
d68e8204f7c3 Allow to build a distribution without C-extensions by using --only-pure
Franz Glasner <fzglas.hg@dom66.de>
parents: 585
diff changeset
128 ]
542
f71d34dda19f Add an optional C-implementation for configmix.config.unquote and configmix.config.pathstr2path.
Franz Glasner <fzglas.hg@dom66.de>
parents: 296
diff changeset
129
586
d68e8204f7c3 Allow to build a distribution without C-extensions by using --only-pure
Franz Glasner <fzglas.hg@dom66.de>
parents: 585
diff changeset
130 if py_limited_api:
d68e8204f7c3 Allow to build a distribution without C-extensions by using --only-pure
Franz Glasner <fzglas.hg@dom66.de>
parents: 585
diff changeset
131 #
d68e8204f7c3 Allow to build a distribution without C-extensions by using --only-pure
Franz Glasner <fzglas.hg@dom66.de>
parents: 585
diff changeset
132 # Build a wheel that is properly named using the stable API
d68e8204f7c3 Allow to build a distribution without C-extensions by using --only-pure
Franz Glasner <fzglas.hg@dom66.de>
parents: 585
diff changeset
133 #
d68e8204f7c3 Allow to build a distribution without C-extensions by using --only-pure
Franz Glasner <fzglas.hg@dom66.de>
parents: 585
diff changeset
134 try:
d68e8204f7c3 Allow to build a distribution without C-extensions by using --only-pure
Franz Glasner <fzglas.hg@dom66.de>
parents: 585
diff changeset
135 import wheel.bdist_wheel
d68e8204f7c3 Allow to build a distribution without C-extensions by using --only-pure
Franz Glasner <fzglas.hg@dom66.de>
parents: 585
diff changeset
136 except ImportError:
d68e8204f7c3 Allow to build a distribution without C-extensions by using --only-pure
Franz Glasner <fzglas.hg@dom66.de>
parents: 585
diff changeset
137 pass
d68e8204f7c3 Allow to build a distribution without C-extensions by using --only-pure
Franz Glasner <fzglas.hg@dom66.de>
parents: 585
diff changeset
138 else:
d68e8204f7c3 Allow to build a distribution without C-extensions by using --only-pure
Franz Glasner <fzglas.hg@dom66.de>
parents: 585
diff changeset
139 class BDistWheel(wheel.bdist_wheel.bdist_wheel):
d68e8204f7c3 Allow to build a distribution without C-extensions by using --only-pure
Franz Glasner <fzglas.hg@dom66.de>
parents: 585
diff changeset
140 def finalize_options(self):
d68e8204f7c3 Allow to build a distribution without C-extensions by using --only-pure
Franz Glasner <fzglas.hg@dom66.de>
parents: 585
diff changeset
141 # Synchronize this with Py_LIMITED_API
d68e8204f7c3 Allow to build a distribution without C-extensions by using --only-pure
Franz Glasner <fzglas.hg@dom66.de>
parents: 585
diff changeset
142 self.py_limited_api = 'cp37'
d68e8204f7c3 Allow to build a distribution without C-extensions by using --only-pure
Franz Glasner <fzglas.hg@dom66.de>
parents: 585
diff changeset
143 super().finalize_options()
d68e8204f7c3 Allow to build a distribution without C-extensions by using --only-pure
Franz Glasner <fzglas.hg@dom66.de>
parents: 585
diff changeset
144
d68e8204f7c3 Allow to build a distribution without C-extensions by using --only-pure
Franz Glasner <fzglas.hg@dom66.de>
parents: 585
diff changeset
145 cmdclass["bdist_wheel"] = BDistWheel
d68e8204f7c3 Allow to build a distribution without C-extensions by using --only-pure
Franz Glasner <fzglas.hg@dom66.de>
parents: 585
diff changeset
146 else:
d68e8204f7c3 Allow to build a distribution without C-extensions by using --only-pure
Franz Glasner <fzglas.hg@dom66.de>
parents: 585
diff changeset
147
d68e8204f7c3 Allow to build a distribution without C-extensions by using --only-pure
Franz Glasner <fzglas.hg@dom66.de>
parents: 585
diff changeset
148 if not os.path.isfile("configmix/_speedups.pyd"):
d68e8204f7c3 Allow to build a distribution without C-extensions by using --only-pure
Franz Glasner <fzglas.hg@dom66.de>
parents: 585
diff changeset
149 raise RuntimeError("no _speedups.pyd found")
d68e8204f7c3 Allow to build a distribution without C-extensions by using --only-pure
Franz Glasner <fzglas.hg@dom66.de>
parents: 585
diff changeset
150
d68e8204f7c3 Allow to build a distribution without C-extensions by using --only-pure
Franz Glasner <fzglas.hg@dom66.de>
parents: 585
diff changeset
151 setup_extra_kwds["package_data"] = {
d68e8204f7c3 Allow to build a distribution without C-extensions by using --only-pure
Franz Glasner <fzglas.hg@dom66.de>
parents: 585
diff changeset
152 "configmix": ["*.pyd"]
d68e8204f7c3 Allow to build a distribution without C-extensions by using --only-pure
Franz Glasner <fzglas.hg@dom66.de>
parents: 585
diff changeset
153 }
d68e8204f7c3 Allow to build a distribution without C-extensions by using --only-pure
Franz Glasner <fzglas.hg@dom66.de>
parents: 585
diff changeset
154
d68e8204f7c3 Allow to build a distribution without C-extensions by using --only-pure
Franz Glasner <fzglas.hg@dom66.de>
parents: 585
diff changeset
155 ext_modules = []
d68e8204f7c3 Allow to build a distribution without C-extensions by using --only-pure
Franz Glasner <fzglas.hg@dom66.de>
parents: 585
diff changeset
156
d68e8204f7c3 Allow to build a distribution without C-extensions by using --only-pure
Franz Glasner <fzglas.hg@dom66.de>
parents: 585
diff changeset
157 py_limited_api = True
542
f71d34dda19f Add an optional C-implementation for configmix.config.unquote and configmix.config.pathstr2path.
Franz Glasner <fzglas.hg@dom66.de>
parents: 296
diff changeset
158
575
9ce13f753c04 Allow execution of setup.py by packaging a cross-built Windows _speedups.pyd.
Franz Glasner <fzglas.hg@dom66.de>
parents: 569
diff changeset
159 if py_limited_api:
9ce13f753c04 Allow execution of setup.py by packaging a cross-built Windows _speedups.pyd.
Franz Glasner <fzglas.hg@dom66.de>
parents: 569
diff changeset
160 #
9ce13f753c04 Allow execution of setup.py by packaging a cross-built Windows _speedups.pyd.
Franz Glasner <fzglas.hg@dom66.de>
parents: 569
diff changeset
161 # Build a wheel that is properly named using the stable API
9ce13f753c04 Allow execution of setup.py by packaging a cross-built Windows _speedups.pyd.
Franz Glasner <fzglas.hg@dom66.de>
parents: 569
diff changeset
162 #
9ce13f753c04 Allow execution of setup.py by packaging a cross-built Windows _speedups.pyd.
Franz Glasner <fzglas.hg@dom66.de>
parents: 569
diff changeset
163 try:
9ce13f753c04 Allow execution of setup.py by packaging a cross-built Windows _speedups.pyd.
Franz Glasner <fzglas.hg@dom66.de>
parents: 569
diff changeset
164 import wheel.bdist_wheel
9ce13f753c04 Allow execution of setup.py by packaging a cross-built Windows _speedups.pyd.
Franz Glasner <fzglas.hg@dom66.de>
parents: 569
diff changeset
165 except ImportError:
9ce13f753c04 Allow execution of setup.py by packaging a cross-built Windows _speedups.pyd.
Franz Glasner <fzglas.hg@dom66.de>
parents: 569
diff changeset
166 pass
9ce13f753c04 Allow execution of setup.py by packaging a cross-built Windows _speedups.pyd.
Franz Glasner <fzglas.hg@dom66.de>
parents: 569
diff changeset
167 else:
9ce13f753c04 Allow execution of setup.py by packaging a cross-built Windows _speedups.pyd.
Franz Glasner <fzglas.hg@dom66.de>
parents: 569
diff changeset
168 class BDistWheel(wheel.bdist_wheel.bdist_wheel):
9ce13f753c04 Allow execution of setup.py by packaging a cross-built Windows _speedups.pyd.
Franz Glasner <fzglas.hg@dom66.de>
parents: 569
diff changeset
169 def finalize_options(self):
586
d68e8204f7c3 Allow to build a distribution without C-extensions by using --only-pure
Franz Glasner <fzglas.hg@dom66.de>
parents: 585
diff changeset
170 #
d68e8204f7c3 Allow to build a distribution without C-extensions by using --only-pure
Franz Glasner <fzglas.hg@dom66.de>
parents: 585
diff changeset
171 # Synchronize this with Py_LIMITED_API and with the
d68e8204f7c3 Allow to build a distribution without C-extensions by using --only-pure
Franz Glasner <fzglas.hg@dom66.de>
parents: 585
diff changeset
172 # external build of _speedups.pyd.
d68e8204f7c3 Allow to build a distribution without C-extensions by using --only-pure
Franz Glasner <fzglas.hg@dom66.de>
parents: 585
diff changeset
173 # Also use the --plat-name (-p) for tagging the Wheel
d68e8204f7c3 Allow to build a distribution without C-extensions by using --only-pure
Franz Glasner <fzglas.hg@dom66.de>
parents: 585
diff changeset
174 # properly (e.g. -p win_amd64).
d68e8204f7c3 Allow to build a distribution without C-extensions by using --only-pure
Franz Glasner <fzglas.hg@dom66.de>
parents: 585
diff changeset
175 #
575
9ce13f753c04 Allow execution of setup.py by packaging a cross-built Windows _speedups.pyd.
Franz Glasner <fzglas.hg@dom66.de>
parents: 569
diff changeset
176 self.py_limited_api = 'cp37'
9ce13f753c04 Allow execution of setup.py by packaging a cross-built Windows _speedups.pyd.
Franz Glasner <fzglas.hg@dom66.de>
parents: 569
diff changeset
177 super().finalize_options()
9ce13f753c04 Allow execution of setup.py by packaging a cross-built Windows _speedups.pyd.
Franz Glasner <fzglas.hg@dom66.de>
parents: 569
diff changeset
178
9ce13f753c04 Allow execution of setup.py by packaging a cross-built Windows _speedups.pyd.
Franz Glasner <fzglas.hg@dom66.de>
parents: 569
diff changeset
179 cmdclass["bdist_wheel"] = BDistWheel
9ce13f753c04 Allow execution of setup.py by packaging a cross-built Windows _speedups.pyd.
Franz Glasner <fzglas.hg@dom66.de>
parents: 569
diff changeset
180
747
95d3239bec73 FIX: Root-Is-PureLib: false installs into "purelib" but should install into "platlib".
Franz Glasner <f.glasner@feldmann-mg.com>
parents: 687
diff changeset
181
95d3239bec73 FIX: Root-Is-PureLib: false installs into "purelib" but should install into "platlib".
Franz Glasner <f.glasner@feldmann-mg.com>
parents: 687
diff changeset
182 #
95d3239bec73 FIX: Root-Is-PureLib: false installs into "purelib" but should install into "platlib".
Franz Glasner <f.glasner@feldmann-mg.com>
parents: 687
diff changeset
183 # See also: https://peps.python.org/pep-0427/
95d3239bec73 FIX: Root-Is-PureLib: false installs into "purelib" but should install into "platlib".
Franz Glasner <f.glasner@feldmann-mg.com>
parents: 687
diff changeset
184 # See also: https://github.com/google/or-tools/issues/616
95d3239bec73 FIX: Root-Is-PureLib: false installs into "purelib" but should install into "platlib".
Franz Glasner <f.glasner@feldmann-mg.com>
parents: 687
diff changeset
185 #
95d3239bec73 FIX: Root-Is-PureLib: false installs into "purelib" but should install into "platlib".
Franz Glasner <f.glasner@feldmann-mg.com>
parents: 687
diff changeset
186 from setuptools.command.install import install
95d3239bec73 FIX: Root-Is-PureLib: false installs into "purelib" but should install into "platlib".
Franz Glasner <f.glasner@feldmann-mg.com>
parents: 687
diff changeset
187
95d3239bec73 FIX: Root-Is-PureLib: false installs into "purelib" but should install into "platlib".
Franz Glasner <f.glasner@feldmann-mg.com>
parents: 687
diff changeset
188 class InstallPlatlib(install):
95d3239bec73 FIX: Root-Is-PureLib: false installs into "purelib" but should install into "platlib".
Franz Glasner <f.glasner@feldmann-mg.com>
parents: 687
diff changeset
189 def finalize_options(self):
95d3239bec73 FIX: Root-Is-PureLib: false installs into "purelib" but should install into "platlib".
Franz Glasner <f.glasner@feldmann-mg.com>
parents: 687
diff changeset
190 super().finalize_options()
95d3239bec73 FIX: Root-Is-PureLib: false installs into "purelib" but should install into "platlib".
Franz Glasner <f.glasner@feldmann-mg.com>
parents: 687
diff changeset
191 if self.distribution.has_ext_modules():
95d3239bec73 FIX: Root-Is-PureLib: false installs into "purelib" but should install into "platlib".
Franz Glasner <f.glasner@feldmann-mg.com>
parents: 687
diff changeset
192 self.install_lib = self.install_platlib
95d3239bec73 FIX: Root-Is-PureLib: false installs into "purelib" but should install into "platlib".
Franz Glasner <f.glasner@feldmann-mg.com>
parents: 687
diff changeset
193
95d3239bec73 FIX: Root-Is-PureLib: false installs into "purelib" but should install into "platlib".
Franz Glasner <f.glasner@feldmann-mg.com>
parents: 687
diff changeset
194 cmdclass["install"] = InstallPlatlib
95d3239bec73 FIX: Root-Is-PureLib: false installs into "purelib" but should install into "platlib".
Franz Glasner <f.glasner@feldmann-mg.com>
parents: 687
diff changeset
195
586
d68e8204f7c3 Allow to build a distribution without C-extensions by using --only-pure
Franz Glasner <fzglas.hg@dom66.de>
parents: 585
diff changeset
196 from setuptools.dist import Distribution
575
9ce13f753c04 Allow execution of setup.py by packaging a cross-built Windows _speedups.pyd.
Franz Glasner <fzglas.hg@dom66.de>
parents: 569
diff changeset
197
542
f71d34dda19f Add an optional C-implementation for configmix.config.unquote and configmix.config.pathstr2path.
Franz Glasner <fzglas.hg@dom66.de>
parents: 296
diff changeset
198 #
586
d68e8204f7c3 Allow to build a distribution without C-extensions by using --only-pure
Franz Glasner <fzglas.hg@dom66.de>
parents: 585
diff changeset
199 # Force a binary package. An empty ext_modules does not do this always.
d68e8204f7c3 Allow to build a distribution without C-extensions by using --only-pure
Franz Glasner <fzglas.hg@dom66.de>
parents: 585
diff changeset
200 # Tested with wheel v0.29.0
542
f71d34dda19f Add an optional C-implementation for configmix.config.unquote and configmix.config.pathstr2path.
Franz Glasner <fzglas.hg@dom66.de>
parents: 296
diff changeset
201 #
586
d68e8204f7c3 Allow to build a distribution without C-extensions by using --only-pure
Franz Glasner <fzglas.hg@dom66.de>
parents: 585
diff changeset
202 class BinaryDistribution(Distribution):
d68e8204f7c3 Allow to build a distribution without C-extensions by using --only-pure
Franz Glasner <fzglas.hg@dom66.de>
parents: 585
diff changeset
203 """Distribution which always forces a binary package with
d68e8204f7c3 Allow to build a distribution without C-extensions by using --only-pure
Franz Glasner <fzglas.hg@dom66.de>
parents: 585
diff changeset
204
d68e8204f7c3 Allow to build a distribution without C-extensions by using --only-pure
Franz Glasner <fzglas.hg@dom66.de>
parents: 585
diff changeset
205 platform name
542
f71d34dda19f Add an optional C-implementation for configmix.config.unquote and configmix.config.pathstr2path.
Franz Glasner <fzglas.hg@dom66.de>
parents: 296
diff changeset
206
586
d68e8204f7c3 Allow to build a distribution without C-extensions by using --only-pure
Franz Glasner <fzglas.hg@dom66.de>
parents: 585
diff changeset
207 """
d68e8204f7c3 Allow to build a distribution without C-extensions by using --only-pure
Franz Glasner <fzglas.hg@dom66.de>
parents: 585
diff changeset
208 def has_ext_modules(foo):
d68e8204f7c3 Allow to build a distribution without C-extensions by using --only-pure
Franz Glasner <fzglas.hg@dom66.de>
parents: 585
diff changeset
209 return True
575
9ce13f753c04 Allow execution of setup.py by packaging a cross-built Windows _speedups.pyd.
Franz Glasner <fzglas.hg@dom66.de>
parents: 569
diff changeset
210
586
d68e8204f7c3 Allow to build a distribution without C-extensions by using --only-pure
Franz Glasner <fzglas.hg@dom66.de>
parents: 585
diff changeset
211 setup_extra_kwds["distclass"] = BinaryDistribution
d68e8204f7c3 Allow to build a distribution without C-extensions by using --only-pure
Franz Glasner <fzglas.hg@dom66.de>
parents: 585
diff changeset
212 else:
575
9ce13f753c04 Allow execution of setup.py by packaging a cross-built Windows _speedups.pyd.
Franz Glasner <fzglas.hg@dom66.de>
parents: 569
diff changeset
213 #
586
d68e8204f7c3 Allow to build a distribution without C-extensions by using --only-pure
Franz Glasner <fzglas.hg@dom66.de>
parents: 585
diff changeset
214 # pure
d68e8204f7c3 Allow to build a distribution without C-extensions by using --only-pure
Franz Glasner <fzglas.hg@dom66.de>
parents: 585
diff changeset
215 #
d68e8204f7c3 Allow to build a distribution without C-extensions by using --only-pure
Franz Glasner <fzglas.hg@dom66.de>
parents: 585
diff changeset
216 pass
575
9ce13f753c04 Allow execution of setup.py by packaging a cross-built Windows _speedups.pyd.
Franz Glasner <fzglas.hg@dom66.de>
parents: 569
diff changeset
217
9ce13f753c04 Allow execution of setup.py by packaging a cross-built Windows _speedups.pyd.
Franz Glasner <fzglas.hg@dom66.de>
parents: 569
diff changeset
218
9ce13f753c04 Allow execution of setup.py by packaging a cross-built Windows _speedups.pyd.
Franz Glasner <fzglas.hg@dom66.de>
parents: 569
diff changeset
219 if ext_modules is not None:
567
059260191371 Tweak setup.py to build packages with pure-Python tags if the extension is not expected to be built (Python 3.4-)
Franz Glasner <fzglas.hg@dom66.de>
parents: 546
diff changeset
220 setup_extra_kwds["ext_modules"] = ext_modules
569
1bdf88437555 FIX: zip_safe: make zip_safe False if extensions are to be built
Franz Glasner <fzglas.hg@dom66.de>
parents: 568
diff changeset
221 setup_extra_kwds["zip_safe"] = False
1bdf88437555 FIX: zip_safe: make zip_safe False if extensions are to be built
Franz Glasner <fzglas.hg@dom66.de>
parents: 568
diff changeset
222 else:
1bdf88437555 FIX: zip_safe: make zip_safe False if extensions are to be built
Franz Glasner <fzglas.hg@dom66.de>
parents: 568
diff changeset
223 setup_extra_kwds["zip_safe"] = True
567
059260191371 Tweak setup.py to build packages with pure-Python tags if the extension is not expected to be built (Python 3.4-)
Franz Glasner <fzglas.hg@dom66.de>
parents: 546
diff changeset
224 if cmdclass:
059260191371 Tweak setup.py to build packages with pure-Python tags if the extension is not expected to be built (Python 3.4-)
Franz Glasner <fzglas.hg@dom66.de>
parents: 546
diff changeset
225 setup_extra_kwds["cmdclass"] = cmdclass
059260191371 Tweak setup.py to build packages with pure-Python tags if the extension is not expected to be built (Python 3.4-)
Franz Glasner <fzglas.hg@dom66.de>
parents: 546
diff changeset
226
0
53ea2bc254e7 Begin a package to abstract some of the important configuration handling stuff.
Franz Glasner <hg@dom66.de>
parents:
diff changeset
227 setup(
582
0467b3ae34ea setup.py: Put the official projectname into a variable and re-use
Franz Glasner <fzglas.hg@dom66.de>
parents: 577
diff changeset
228 name=PROJECT_NAME,
0
53ea2bc254e7 Begin a package to abstract some of the important configuration handling stuff.
Franz Glasner <hg@dom66.de>
parents:
diff changeset
229 version=version,
53ea2bc254e7 Begin a package to abstract some of the important configuration handling stuff.
Franz Glasner <hg@dom66.de>
parents:
diff changeset
230 author="Franz Glasner",
296
eed16a1ec8f3 Use SPDX license identifiers (either full or short) all over the package
Franz Glasner <fzglas.hg@dom66.de>
parents: 282
diff changeset
231 license='BSD 3-Clause "New" or "Revised" License',
5
dc058099a4cb Renamed the project from "MixConfig" to "ConfigMix"
Franz Glasner <hg@dom66.de>
parents: 4
diff changeset
232 url="https://pypi.dom66.de/simple/configmix/",
0
53ea2bc254e7 Begin a package to abstract some of the important configuration handling stuff.
Franz Glasner <hg@dom66.de>
parents:
diff changeset
233 description="Library for extended configuration files",
53ea2bc254e7 Begin a package to abstract some of the important configuration handling stuff.
Franz Glasner <hg@dom66.de>
parents:
diff changeset
234 long_description=long_description,
568
ed1f0fdcda65 Provide the content-type for the long package description: text/x-rst
Franz Glasner <fzglas.hg@dom66.de>
parents: 567
diff changeset
235 long_description_content_type="text/x-rst",
282
da1596034954 Implemented an "AWS" namespace to retrieve some AWS-specific metadata
Franz Glasner <fzglas.hg@dom66.de>
parents: 277
diff changeset
236 packages=["configmix",
da1596034954 Implemented an "AWS" namespace to retrieve some AWS-specific metadata
Franz Glasner <fzglas.hg@dom66.de>
parents: 277
diff changeset
237 "configmix.extras"],
575
9ce13f753c04 Allow execution of setup.py by packaging a cross-built Windows _speedups.pyd.
Franz Glasner <fzglas.hg@dom66.de>
parents: 569
diff changeset
238 #
9ce13f753c04 Allow execution of setup.py by packaging a cross-built Windows _speedups.pyd.
Franz Glasner <fzglas.hg@dom66.de>
parents: 569
diff changeset
239 # Use non-automatic explicit package_data instead
9ce13f753c04 Allow execution of setup.py by packaging a cross-built Windows _speedups.pyd.
Franz Glasner <fzglas.hg@dom66.de>
parents: 569
diff changeset
240 # (or MANIFEST.in for sdist)
9ce13f753c04 Allow execution of setup.py by packaging a cross-built Windows _speedups.pyd.
Franz Glasner <fzglas.hg@dom66.de>
parents: 569
diff changeset
241 #
0
53ea2bc254e7 Begin a package to abstract some of the important configuration handling stuff.
Franz Glasner <hg@dom66.de>
parents:
diff changeset
242 include_package_data=False,
53ea2bc254e7 Begin a package to abstract some of the important configuration handling stuff.
Franz Glasner <hg@dom66.de>
parents:
diff changeset
243 platforms="any",
53ea2bc254e7 Begin a package to abstract some of the important configuration handling stuff.
Franz Glasner <hg@dom66.de>
parents:
diff changeset
244 classifiers=[
53ea2bc254e7 Begin a package to abstract some of the important configuration handling stuff.
Franz Glasner <hg@dom66.de>
parents:
diff changeset
245 "Development Status :: 5 - Production/Stable",
53ea2bc254e7 Begin a package to abstract some of the important configuration handling stuff.
Franz Glasner <hg@dom66.de>
parents:
diff changeset
246 "Environment :: Console",
53ea2bc254e7 Begin a package to abstract some of the important configuration handling stuff.
Franz Glasner <hg@dom66.de>
parents:
diff changeset
247 "Intended Audience :: Developers",
4
f76d85ccc5b9 Switch to the "New BSD License"
Franz Glasner <f.glasner@feldmann-mg.com>
parents: 0
diff changeset
248 "License :: OSI Approved :: BSD License",
0
53ea2bc254e7 Begin a package to abstract some of the important configuration handling stuff.
Franz Glasner <hg@dom66.de>
parents:
diff changeset
249 "Operating System :: OS Independent",
53ea2bc254e7 Begin a package to abstract some of the important configuration handling stuff.
Franz Glasner <hg@dom66.de>
parents:
diff changeset
250 "Programming Language :: Python",
53ea2bc254e7 Begin a package to abstract some of the important configuration handling stuff.
Franz Glasner <hg@dom66.de>
parents:
diff changeset
251 "Programming Language :: Python :: 2.6",
53ea2bc254e7 Begin a package to abstract some of the important configuration handling stuff.
Franz Glasner <hg@dom66.de>
parents:
diff changeset
252 "Programming Language :: Python :: 2.7",
53ea2bc254e7 Begin a package to abstract some of the important configuration handling stuff.
Franz Glasner <hg@dom66.de>
parents:
diff changeset
253 "Programming Language :: Python :: 3",
53ea2bc254e7 Begin a package to abstract some of the important configuration handling stuff.
Franz Glasner <hg@dom66.de>
parents:
diff changeset
254 "Topic :: Software Development :: Libraries :: Python Modules"
53ea2bc254e7 Begin a package to abstract some of the important configuration handling stuff.
Franz Glasner <hg@dom66.de>
parents:
diff changeset
255 ],
185
5c27e52c3483 Declare requirements on the Python version formally also
Franz Glasner <fzglas.hg@dom66.de>
parents: 184
diff changeset
256 python_requires=">=2.6",
184
781b8dc1883f Use the pip "extras" feature to install optional features (e.g. PyYAML)
Franz Glasner <fzglas.hg@dom66.de>
parents: 80
diff changeset
257 extras_require={
575
9ce13f753c04 Allow execution of setup.py by packaging a cross-built Windows _speedups.pyd.
Franz Glasner <fzglas.hg@dom66.de>
parents: 569
diff changeset
258 "aws": aws_requirements, # noqa: E241
195
28e6c1413947 Added support for TOML style configuration files
Franz Glasner <fzglas.hg@dom66.de>
parents: 185
diff changeset
259 "toml": toml_requirements,
184
781b8dc1883f Use the pip "extras" feature to install optional features (e.g. PyYAML)
Franz Glasner <fzglas.hg@dom66.de>
parents: 80
diff changeset
260 "yaml": yaml_requirements,
687
7b3c3a89f720 Add extra "sasl" because for the "saslprep()" filter passlib.utils is needed
Franz Glasner <fzglas.hg@dom66.de>
parents: 672
diff changeset
261 "sasl": sasl_requirements,
575
9ce13f753c04 Allow execution of setup.py by packaging a cross-built Windows _speedups.pyd.
Franz Glasner <fzglas.hg@dom66.de>
parents: 569
diff changeset
262 "all": all_requirements, # noqa: E241
184
781b8dc1883f Use the pip "extras" feature to install optional features (e.g. PyYAML)
Franz Glasner <fzglas.hg@dom66.de>
parents: 80
diff changeset
263 },
781b8dc1883f Use the pip "extras" feature to install optional features (e.g. PyYAML)
Franz Glasner <fzglas.hg@dom66.de>
parents: 80
diff changeset
264 tests_require=all_requirements,
567
059260191371 Tweak setup.py to build packages with pure-Python tags if the extension is not expected to be built (Python 3.4-)
Franz Glasner <fzglas.hg@dom66.de>
parents: 546
diff changeset
265 **setup_extra_kwds
0
53ea2bc254e7 Begin a package to abstract some of the important configuration handling stuff.
Franz Glasner <hg@dom66.de>
parents:
diff changeset
266 )