azure-template-two 1.0.0b1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- azure_template_two-1.0.0b1/CHANGELOG.md +9 -0
- azure_template_two-1.0.0b1/LICENSE +21 -0
- azure_template_two-1.0.0b1/MANIFEST.in +4 -0
- azure_template_two-1.0.0b1/PKG-INFO +83 -0
- azure_template_two-1.0.0b1/README.md +60 -0
- azure_template_two-1.0.0b1/azure/template/two/__init__.py +9 -0
- azure_template_two-1.0.0b1/azure/template/two/_version.py +7 -0
- azure_template_two-1.0.0b1/azure/template/two/istrue.pyi +13 -0
- azure_template_two-1.0.0b1/azure/template/two/py.typed +0 -0
- azure_template_two-1.0.0b1/azure/template/two/src/istruemodule.c +30 -0
- azure_template_two-1.0.0b1/azure_template_two.egg-info/PKG-INFO +83 -0
- azure_template_two-1.0.0b1/azure_template_two.egg-info/SOURCES.txt +16 -0
- azure_template_two-1.0.0b1/azure_template_two.egg-info/dependency_links.txt +1 -0
- azure_template_two-1.0.0b1/azure_template_two.egg-info/top_level.txt +2 -0
- azure_template_two-1.0.0b1/pyproject.toml +92 -0
- azure_template_two-1.0.0b1/setup.cfg +4 -0
- azure_template_two-1.0.0b1/setup.py +45 -0
- azure_template_two-1.0.0b1/tests/test_istrue.py +24 -0
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
Copyright (c) Microsoft Corporation.
|
|
2
|
+
|
|
3
|
+
MIT License
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: azure-template-two
|
|
3
|
+
Version: 1.0.0b1
|
|
4
|
+
Summary: Microsoft Azure Template Package (Binary) Client Library for Python
|
|
5
|
+
Author-email: Microsoft Corporation <azuresdkengsysadmins@microsoft.com>
|
|
6
|
+
License-Expression: MIT
|
|
7
|
+
Project-URL: Bug Reports, https://github.com/Azure/azure-sdk-for-python/issues
|
|
8
|
+
Project-URL: repository, https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/template/azure-template-two
|
|
9
|
+
Keywords: azure,azure sdk
|
|
10
|
+
Classifier: Development Status :: 4 - Beta
|
|
11
|
+
Classifier: Programming Language :: Python
|
|
12
|
+
Classifier: Programming Language :: Python :: 3 :: Only
|
|
13
|
+
Classifier: Programming Language :: Python :: 3
|
|
14
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
15
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
16
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
17
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
18
|
+
Classifier: Programming Language :: Python :: 3.14
|
|
19
|
+
Requires-Python: >=3.10
|
|
20
|
+
Description-Content-Type: text/markdown
|
|
21
|
+
License-File: LICENSE
|
|
22
|
+
Dynamic: license-file
|
|
23
|
+
|
|
24
|
+
# Azure Binary Template Package client library for Python
|
|
25
|
+
|
|
26
|
+
**This package is a test fixture for the Azure SDK engineering system and is not intended for direct use.**
|
|
27
|
+
|
|
28
|
+
`azure-template-two` is the binary counterpart to `azure-template`. It ships a minimal C extension so that the build and release pipelines have a package that produces both platform specific wheels and an sdist.
|
|
29
|
+
|
|
30
|
+
## Getting started
|
|
31
|
+
|
|
32
|
+
### Installation
|
|
33
|
+
|
|
34
|
+
```bash
|
|
35
|
+
pip install azure-template-two
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
### Prerequisites
|
|
39
|
+
* Python 3.10 or later is required to use this package. For more details, please read our page on [Azure SDK for Python version support policy](https://github.com/Azure/azure-sdk-for-python/blob/main/doc/python_version_support_policy.md).
|
|
40
|
+
|
|
41
|
+
## Key concepts
|
|
42
|
+
|
|
43
|
+
The extension exposes a single function that takes no arguments and always returns `True`.
|
|
44
|
+
|
|
45
|
+
## Examples
|
|
46
|
+
|
|
47
|
+
```python
|
|
48
|
+
from azure.template.two import istrue
|
|
49
|
+
|
|
50
|
+
istrue.is_true() # True
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
## Troubleshooting
|
|
54
|
+
|
|
55
|
+
### Building locally
|
|
56
|
+
|
|
57
|
+
Wheels are produced with [cibuildwheel](https://cibuildwheel.pypa.io/), configured in `pyproject.toml` to build CPython 3.10 for x86_64 Linux, x86_64 Windows, and arm64 macOS. Because the extension compiles against the CPython limited API, each wheel is tagged `abi3` and remains importable on later interpreters.
|
|
58
|
+
|
|
59
|
+
To build and test the arm64 macOS wheel locally:
|
|
60
|
+
|
|
61
|
+
```bash
|
|
62
|
+
pip install cibuildwheel
|
|
63
|
+
cibuildwheel --only cp310-macosx_arm64 sdk/template/azure-template-two
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
A plain in-place build is also enough for local development:
|
|
67
|
+
|
|
68
|
+
```bash
|
|
69
|
+
pip install -e sdk/template/azure-template-two
|
|
70
|
+
pytest sdk/template/azure-template-two/tests
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
## Next steps
|
|
74
|
+
|
|
75
|
+
Use it to exercise `cibuildwheel`, binary signing, and publishing without depending on a real service library.
|
|
76
|
+
|
|
77
|
+
## Contributing
|
|
78
|
+
|
|
79
|
+
This project welcomes contributions and suggestions. Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. For details, visit https://cla.microsoft.com.
|
|
80
|
+
|
|
81
|
+
When you submit a pull request, a CLA-bot will automatically determine whether you need to provide a CLA and decorate the PR appropriately (e.g., label, comment). Simply follow the instructions provided by the bot. You will only need to do this once across all repos using our CLA.
|
|
82
|
+
|
|
83
|
+
This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/). For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any additional questions or comments.
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
# Azure Binary Template Package client library for Python
|
|
2
|
+
|
|
3
|
+
**This package is a test fixture for the Azure SDK engineering system and is not intended for direct use.**
|
|
4
|
+
|
|
5
|
+
`azure-template-two` is the binary counterpart to `azure-template`. It ships a minimal C extension so that the build and release pipelines have a package that produces both platform specific wheels and an sdist.
|
|
6
|
+
|
|
7
|
+
## Getting started
|
|
8
|
+
|
|
9
|
+
### Installation
|
|
10
|
+
|
|
11
|
+
```bash
|
|
12
|
+
pip install azure-template-two
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
### Prerequisites
|
|
16
|
+
* Python 3.10 or later is required to use this package. For more details, please read our page on [Azure SDK for Python version support policy](https://github.com/Azure/azure-sdk-for-python/blob/main/doc/python_version_support_policy.md).
|
|
17
|
+
|
|
18
|
+
## Key concepts
|
|
19
|
+
|
|
20
|
+
The extension exposes a single function that takes no arguments and always returns `True`.
|
|
21
|
+
|
|
22
|
+
## Examples
|
|
23
|
+
|
|
24
|
+
```python
|
|
25
|
+
from azure.template.two import istrue
|
|
26
|
+
|
|
27
|
+
istrue.is_true() # True
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
## Troubleshooting
|
|
31
|
+
|
|
32
|
+
### Building locally
|
|
33
|
+
|
|
34
|
+
Wheels are produced with [cibuildwheel](https://cibuildwheel.pypa.io/), configured in `pyproject.toml` to build CPython 3.10 for x86_64 Linux, x86_64 Windows, and arm64 macOS. Because the extension compiles against the CPython limited API, each wheel is tagged `abi3` and remains importable on later interpreters.
|
|
35
|
+
|
|
36
|
+
To build and test the arm64 macOS wheel locally:
|
|
37
|
+
|
|
38
|
+
```bash
|
|
39
|
+
pip install cibuildwheel
|
|
40
|
+
cibuildwheel --only cp310-macosx_arm64 sdk/template/azure-template-two
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
A plain in-place build is also enough for local development:
|
|
44
|
+
|
|
45
|
+
```bash
|
|
46
|
+
pip install -e sdk/template/azure-template-two
|
|
47
|
+
pytest sdk/template/azure-template-two/tests
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
## Next steps
|
|
51
|
+
|
|
52
|
+
Use it to exercise `cibuildwheel`, binary signing, and publishing without depending on a real service library.
|
|
53
|
+
|
|
54
|
+
## Contributing
|
|
55
|
+
|
|
56
|
+
This project welcomes contributions and suggestions. Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. For details, visit https://cla.microsoft.com.
|
|
57
|
+
|
|
58
|
+
When you submit a pull request, a CLA-bot will automatically determine whether you need to provide a CLA and decorate the PR appropriately (e.g., label, comment). Simply follow the instructions provided by the bot. You will only need to do this once across all repos using our CLA.
|
|
59
|
+
|
|
60
|
+
This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/). For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any additional questions or comments.
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
# -------------------------------------------------------------------------
|
|
2
|
+
# Copyright (c) Microsoft Corporation. All rights reserved.
|
|
3
|
+
# Licensed under the MIT License. See License.txt in the project root for
|
|
4
|
+
# license information.
|
|
5
|
+
# --------------------------------------------------------------------------
|
|
6
|
+
|
|
7
|
+
from . import istrue
|
|
8
|
+
|
|
9
|
+
__all__ = ["istrue"]
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
# -------------------------------------------------------------------------
|
|
2
|
+
# Copyright (c) Microsoft Corporation. All rights reserved.
|
|
3
|
+
# Licensed under the MIT License. See License.txt in the project root for
|
|
4
|
+
# license information.
|
|
5
|
+
# --------------------------------------------------------------------------
|
|
6
|
+
|
|
7
|
+
VERSION = "1.0.0b1"
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
# -------------------------------------------------------------------------
|
|
2
|
+
# Copyright (c) Microsoft Corporation. All rights reserved.
|
|
3
|
+
# Licensed under the MIT License. See License.txt in the project root for
|
|
4
|
+
# license information.
|
|
5
|
+
# --------------------------------------------------------------------------
|
|
6
|
+
# pylint: skip-file
|
|
7
|
+
|
|
8
|
+
def is_true() -> bool:
|
|
9
|
+
"""Return True.
|
|
10
|
+
|
|
11
|
+
:returns: True, always.
|
|
12
|
+
"""
|
|
13
|
+
...
|
|
File without changes
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
// Copyright (c) Microsoft Corporation.
|
|
2
|
+
// Licensed under the MIT License.
|
|
3
|
+
|
|
4
|
+
#define PY_SSIZE_T_CLEAN
|
|
5
|
+
#include <Python.h>
|
|
6
|
+
|
|
7
|
+
// This package exists to give the release pipeline a package that ships both a
|
|
8
|
+
// platform specific binary wheel and an sdist. The implementation is therefore
|
|
9
|
+
// deliberately trivial: one function that takes no arguments and returns True.
|
|
10
|
+
static PyObject* is_true(PyObject* self, PyObject* Py_UNUSED(ignored)) {
|
|
11
|
+
Py_RETURN_TRUE;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
static PyMethodDef istrue_methods[] = {
|
|
15
|
+
{ "is_true", (PyCFunction)is_true, METH_NOARGS, "Return True." },
|
|
16
|
+
{ NULL, NULL, 0, NULL }
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
static PyModuleDef istrue_module = {
|
|
20
|
+
PyModuleDef_HEAD_INIT,
|
|
21
|
+
"istrue", // Module name to use with Python import statements
|
|
22
|
+
"Minimal native extension used to exercise binary packaging and signing.",
|
|
23
|
+
0,
|
|
24
|
+
istrue_methods
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
PyMODINIT_FUNC
|
|
28
|
+
PyInit_istrue() {
|
|
29
|
+
return PyModule_Create(&istrue_module);
|
|
30
|
+
}
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: azure-template-two
|
|
3
|
+
Version: 1.0.0b1
|
|
4
|
+
Summary: Microsoft Azure Template Package (Binary) Client Library for Python
|
|
5
|
+
Author-email: Microsoft Corporation <azuresdkengsysadmins@microsoft.com>
|
|
6
|
+
License-Expression: MIT
|
|
7
|
+
Project-URL: Bug Reports, https://github.com/Azure/azure-sdk-for-python/issues
|
|
8
|
+
Project-URL: repository, https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/template/azure-template-two
|
|
9
|
+
Keywords: azure,azure sdk
|
|
10
|
+
Classifier: Development Status :: 4 - Beta
|
|
11
|
+
Classifier: Programming Language :: Python
|
|
12
|
+
Classifier: Programming Language :: Python :: 3 :: Only
|
|
13
|
+
Classifier: Programming Language :: Python :: 3
|
|
14
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
15
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
16
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
17
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
18
|
+
Classifier: Programming Language :: Python :: 3.14
|
|
19
|
+
Requires-Python: >=3.10
|
|
20
|
+
Description-Content-Type: text/markdown
|
|
21
|
+
License-File: LICENSE
|
|
22
|
+
Dynamic: license-file
|
|
23
|
+
|
|
24
|
+
# Azure Binary Template Package client library for Python
|
|
25
|
+
|
|
26
|
+
**This package is a test fixture for the Azure SDK engineering system and is not intended for direct use.**
|
|
27
|
+
|
|
28
|
+
`azure-template-two` is the binary counterpart to `azure-template`. It ships a minimal C extension so that the build and release pipelines have a package that produces both platform specific wheels and an sdist.
|
|
29
|
+
|
|
30
|
+
## Getting started
|
|
31
|
+
|
|
32
|
+
### Installation
|
|
33
|
+
|
|
34
|
+
```bash
|
|
35
|
+
pip install azure-template-two
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
### Prerequisites
|
|
39
|
+
* Python 3.10 or later is required to use this package. For more details, please read our page on [Azure SDK for Python version support policy](https://github.com/Azure/azure-sdk-for-python/blob/main/doc/python_version_support_policy.md).
|
|
40
|
+
|
|
41
|
+
## Key concepts
|
|
42
|
+
|
|
43
|
+
The extension exposes a single function that takes no arguments and always returns `True`.
|
|
44
|
+
|
|
45
|
+
## Examples
|
|
46
|
+
|
|
47
|
+
```python
|
|
48
|
+
from azure.template.two import istrue
|
|
49
|
+
|
|
50
|
+
istrue.is_true() # True
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
## Troubleshooting
|
|
54
|
+
|
|
55
|
+
### Building locally
|
|
56
|
+
|
|
57
|
+
Wheels are produced with [cibuildwheel](https://cibuildwheel.pypa.io/), configured in `pyproject.toml` to build CPython 3.10 for x86_64 Linux, x86_64 Windows, and arm64 macOS. Because the extension compiles against the CPython limited API, each wheel is tagged `abi3` and remains importable on later interpreters.
|
|
58
|
+
|
|
59
|
+
To build and test the arm64 macOS wheel locally:
|
|
60
|
+
|
|
61
|
+
```bash
|
|
62
|
+
pip install cibuildwheel
|
|
63
|
+
cibuildwheel --only cp310-macosx_arm64 sdk/template/azure-template-two
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
A plain in-place build is also enough for local development:
|
|
67
|
+
|
|
68
|
+
```bash
|
|
69
|
+
pip install -e sdk/template/azure-template-two
|
|
70
|
+
pytest sdk/template/azure-template-two/tests
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
## Next steps
|
|
74
|
+
|
|
75
|
+
Use it to exercise `cibuildwheel`, binary signing, and publishing without depending on a real service library.
|
|
76
|
+
|
|
77
|
+
## Contributing
|
|
78
|
+
|
|
79
|
+
This project welcomes contributions and suggestions. Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. For details, visit https://cla.microsoft.com.
|
|
80
|
+
|
|
81
|
+
When you submit a pull request, a CLA-bot will automatically determine whether you need to provide a CLA and decorate the PR appropriately (e.g., label, comment). Simply follow the instructions provided by the bot. You will only need to do this once across all repos using our CLA.
|
|
82
|
+
|
|
83
|
+
This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/). For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any additional questions or comments.
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
CHANGELOG.md
|
|
2
|
+
LICENSE
|
|
3
|
+
MANIFEST.in
|
|
4
|
+
README.md
|
|
5
|
+
pyproject.toml
|
|
6
|
+
setup.py
|
|
7
|
+
azure/template/two/__init__.py
|
|
8
|
+
azure/template/two/_version.py
|
|
9
|
+
azure/template/two/istrue.pyi
|
|
10
|
+
azure/template/two/py.typed
|
|
11
|
+
azure/template/two/src/istruemodule.c
|
|
12
|
+
azure_template_two.egg-info/PKG-INFO
|
|
13
|
+
azure_template_two.egg-info/SOURCES.txt
|
|
14
|
+
azure_template_two.egg-info/dependency_links.txt
|
|
15
|
+
azure_template_two.egg-info/top_level.txt
|
|
16
|
+
tests/test_istrue.py
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
# --------------------------------------------------------------------------
|
|
2
|
+
# Copyright (c) Microsoft Corporation. All rights reserved.
|
|
3
|
+
# Licensed under the MIT License. See License.txt in the project root for license information.
|
|
4
|
+
# --------------------------------------------------------------------------
|
|
5
|
+
|
|
6
|
+
[build-system]
|
|
7
|
+
requires = ["setuptools>=77.0.3", "wheel"]
|
|
8
|
+
build-backend = "setuptools.build_meta"
|
|
9
|
+
|
|
10
|
+
[project]
|
|
11
|
+
name = "azure-template-two"
|
|
12
|
+
authors = [
|
|
13
|
+
{ name = "Microsoft Corporation", email = "azuresdkengsysadmins@microsoft.com" },
|
|
14
|
+
]
|
|
15
|
+
description = "Microsoft Azure Template Package (Binary) Client Library for Python"
|
|
16
|
+
license = "MIT"
|
|
17
|
+
classifiers = [
|
|
18
|
+
"Development Status :: 4 - Beta",
|
|
19
|
+
"Programming Language :: Python",
|
|
20
|
+
"Programming Language :: Python :: 3 :: Only",
|
|
21
|
+
"Programming Language :: Python :: 3",
|
|
22
|
+
"Programming Language :: Python :: 3.10",
|
|
23
|
+
"Programming Language :: Python :: 3.11",
|
|
24
|
+
"Programming Language :: Python :: 3.12",
|
|
25
|
+
"Programming Language :: Python :: 3.13",
|
|
26
|
+
"Programming Language :: Python :: 3.14",
|
|
27
|
+
]
|
|
28
|
+
requires-python = ">=3.10"
|
|
29
|
+
dependencies = []
|
|
30
|
+
keywords = ["azure", "azure sdk"]
|
|
31
|
+
dynamic = ["version", "readme"]
|
|
32
|
+
|
|
33
|
+
[project.urls]
|
|
34
|
+
"Bug Reports" = "https://github.com/Azure/azure-sdk-for-python/issues"
|
|
35
|
+
repository = "https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/template/azure-template-two"
|
|
36
|
+
|
|
37
|
+
[tool.setuptools.dynamic]
|
|
38
|
+
version = { attr = "azure.template.two._version.VERSION" }
|
|
39
|
+
readme = { file = ["README.md"], content-type = "text/markdown" }
|
|
40
|
+
|
|
41
|
+
# `azure` and `azure.template` are namespace directories owned by other
|
|
42
|
+
# distributions, so only the leaf package is shipped from here. The C sources
|
|
43
|
+
# live in a `src` directory rather than one named after the extension so that
|
|
44
|
+
# they cannot shadow the compiled module when importing from the source tree.
|
|
45
|
+
[tool.setuptools.packages.find]
|
|
46
|
+
exclude = [
|
|
47
|
+
"tests*",
|
|
48
|
+
"samples*",
|
|
49
|
+
"doc*",
|
|
50
|
+
"azure",
|
|
51
|
+
"azure.template",
|
|
52
|
+
"azure.template.two.src",
|
|
53
|
+
]
|
|
54
|
+
|
|
55
|
+
[tool.azure-sdk-build]
|
|
56
|
+
# This package is a C extension with no public Python surface beyond a single
|
|
57
|
+
# function, so the Python-oriented checks are not meaningful here. This mirrors
|
|
58
|
+
# the settings used by the other binary package in the repo,
|
|
59
|
+
# sdk/storage/azure-storage-extensions.
|
|
60
|
+
mypy = false
|
|
61
|
+
pyright = false
|
|
62
|
+
type_check_samples = false
|
|
63
|
+
verifytypes = false
|
|
64
|
+
pylint = false
|
|
65
|
+
sphinx = false
|
|
66
|
+
verifysdist = false
|
|
67
|
+
verifywhl = false
|
|
68
|
+
sdist = false
|
|
69
|
+
breaking = false
|
|
70
|
+
suppressed_skip_warnings = ["*"]
|
|
71
|
+
|
|
72
|
+
[tool.azure-sdk-conda]
|
|
73
|
+
in_bundle = false
|
|
74
|
+
|
|
75
|
+
# One CPython 3.10 build per platform. Because the extension is compiled
|
|
76
|
+
# against the limited API the resulting wheels are tagged abi3 and remain
|
|
77
|
+
# importable on later interpreters, so this is the smallest matrix that still
|
|
78
|
+
# covers all three operating systems.
|
|
79
|
+
[tool.cibuildwheel]
|
|
80
|
+
build = ["cp310-*"]
|
|
81
|
+
skip = ["*musllinux*"]
|
|
82
|
+
test-requires = "pytest"
|
|
83
|
+
test-command = "pytest {project}/tests"
|
|
84
|
+
|
|
85
|
+
[tool.cibuildwheel.linux]
|
|
86
|
+
archs = "x86_64"
|
|
87
|
+
|
|
88
|
+
[tool.cibuildwheel.macos]
|
|
89
|
+
archs = "arm64"
|
|
90
|
+
|
|
91
|
+
[tool.cibuildwheel.windows]
|
|
92
|
+
archs = "AMD64"
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
# -------------------------------------------------------------------------
|
|
2
|
+
# Copyright (c) Microsoft Corporation. All rights reserved.
|
|
3
|
+
# Licensed under the MIT License. See License.txt in the project root for
|
|
4
|
+
# license information.
|
|
5
|
+
# --------------------------------------------------------------------------
|
|
6
|
+
|
|
7
|
+
# This file remains for two pieces of config that setuptools cannot yet
|
|
8
|
+
# express declaratively in pyproject.toml without opting into experimental
|
|
9
|
+
# config:
|
|
10
|
+
# 1. The limited-API C extension(s) — [tool.setuptools.ext-modules] is
|
|
11
|
+
# still experimental.
|
|
12
|
+
# 2. The abi3 wheel tag (py_limited_api) — the equivalent
|
|
13
|
+
# [tool.distutils.bdist_wheel] table is also still experimental.
|
|
14
|
+
|
|
15
|
+
import re
|
|
16
|
+
from pathlib import Path
|
|
17
|
+
|
|
18
|
+
from setuptools import setup, Extension
|
|
19
|
+
|
|
20
|
+
PACKAGE_NAME = "azure-template-two"
|
|
21
|
+
|
|
22
|
+
# `name` and `version` are declared in pyproject.toml (version dynamically via
|
|
23
|
+
# [tool.setuptools.dynamic]). They are repeated in the setup() call below only
|
|
24
|
+
# because doc-warden's README verification parses setup.py and requires both
|
|
25
|
+
# kwargs to be present. The version is read from _version.py rather than
|
|
26
|
+
# imported so it works under doc-warden's AST exec as well as a normal build;
|
|
27
|
+
# both run with the working directory set to the package root.
|
|
28
|
+
version_text = Path("azure", "template", "two", "_version.py").read_text()
|
|
29
|
+
version = re.search(r'VERSION = "(.*?)"', version_text).group(1)
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
setup(
|
|
33
|
+
name=PACKAGE_NAME,
|
|
34
|
+
version=version,
|
|
35
|
+
ext_package="azure.template.two",
|
|
36
|
+
ext_modules=[
|
|
37
|
+
Extension(
|
|
38
|
+
"istrue",
|
|
39
|
+
["azure/template/two/src/istruemodule.c"],
|
|
40
|
+
define_macros=[("Py_LIMITED_API", "0x030A0000")],
|
|
41
|
+
py_limited_api=True,
|
|
42
|
+
),
|
|
43
|
+
],
|
|
44
|
+
options={"bdist_wheel": {"py_limited_api": "cp310"}},
|
|
45
|
+
)
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
# -------------------------------------------------------------------------
|
|
2
|
+
# Copyright (c) Microsoft Corporation. All rights reserved.
|
|
3
|
+
# Licensed under the MIT License. See License.txt in the project root for
|
|
4
|
+
# license information.
|
|
5
|
+
# --------------------------------------------------------------------------
|
|
6
|
+
|
|
7
|
+
from azure.template.two import istrue
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
def test_is_true_returns_true():
|
|
11
|
+
assert istrue.is_true() is True
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
def test_is_true_takes_no_arguments():
|
|
15
|
+
import pytest
|
|
16
|
+
|
|
17
|
+
with pytest.raises(TypeError):
|
|
18
|
+
istrue.is_true(1)
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
def test_extension_is_native():
|
|
22
|
+
# The wheel is only worth signing if this really is a compiled module
|
|
23
|
+
# rather than a pure Python fallback.
|
|
24
|
+
assert istrue.__file__.endswith((".so", ".pyd", ".dylib"))
|