Skip to content
This repository was archived by the owner on May 13, 2025. It is now read-only.

Commit 2c52c3d

Browse files
Revert "{CI} Remove version import related code in setup.py (Azure#8384)"
This reverts commit 7c0d4d1.
1 parent 161b6bc commit 2c52c3d

35 files changed

Lines changed: 143 additions & 4 deletions

File tree

src/ad/setup.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,10 @@
1111

1212
# HISTORY.rst entry.
1313
VERSION = '0.1.0'
14+
try:
15+
from azext_ad.manual.version import VERSION
16+
except ImportError:
17+
pass
1418

1519
# The full list of classifiers is available at
1620
# https://pypi.python.org/pypi?%3Aaction=list_classifiers

src/alias/setup.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,11 @@
99
import re
1010
from setuptools import setup, find_packages
1111

12-
VERSION = '0.5.2'
12+
# Inspired by https://github.com/Azure/azure-sdk-for-python/blob/master/azure-mgmt-cdn/setup.py#L45
13+
extension_path = os.path.dirname(os.path.realpath(__file__))
14+
with open(os.path.join(extension_path, 'azext_alias', 'version.py'), 'r') as version_file:
15+
VERSION = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]',
16+
version_file.read(), re.MULTILINE).group(1)
1317

1418
CLASSIFIERS = [
1519
'Development Status :: 4 - Beta',

src/attestation/setup.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,10 @@
1111

1212
# HISTORY.rst entry.
1313
VERSION = '1.0.0'
14+
try:
15+
from azext_attestation.manual.version import VERSION
16+
except ImportError:
17+
pass
1418

1519
# The full list of classifiers is available at
1620
# https://pypi.python.org/pypi?%3Aaction=list_classifiers

src/automation/setup.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,10 @@
1111

1212
# HISTORY.rst entry.
1313
VERSION = '1.0.0b1'
14+
try:
15+
from azext_automation.manual.version import VERSION
16+
except ImportError:
17+
pass
1418

1519
# The full list of classifiers is available at
1620
# https://pypi.python.org/pypi?%3Aaction=list_classifiers

src/cloudservice/setup.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,10 @@
1111

1212
# HISTORY.rst entry.
1313
VERSION = '1.0.1'
14+
try:
15+
from azext_cloudservice.manual.version import VERSION
16+
except ImportError:
17+
pass
1418

1519
# The full list of classifiers is available at
1620
# https://pypi.python.org/pypi?%3Aaction=list_classifiers

src/communication/setup.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,10 @@
1010
from setuptools import setup, find_packages
1111

1212
# HISTORY.rst entry.
13-
VERSION = '1.11.2'
13+
try:
14+
from azext_communication.version import VERSION
15+
except ImportError:
16+
pass
1417

1518
# The full list of classifiers is available at
1619
# https://pypi.python.org/pypi?%3Aaction=list_classifiers

src/confidentialledger/setup.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,10 @@
1111

1212
# HISTORY.rst entry.
1313
VERSION = "1.0.0"
14+
try:
15+
from azext_confidentialledger.manual.version import VERSION
16+
except ImportError:
17+
pass
1418

1519
# The full list of classifiers is available at
1620
# https://pypi.python.org/pypi?%3Aaction=list_classifiers

src/connectedmachine/setup.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,10 @@
1111

1212
# HISTORY.rst entry.
1313
VERSION = '1.1.0'
14+
try:
15+
from azext_connectedmachine.manual.version import VERSION
16+
except ImportError:
17+
pass
1418

1519
# The full list of classifiers is available at
1620
# https://pypi.python.org/pypi?%3Aaction=list_classifiers

src/datadog/setup.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,10 @@
1111

1212
# HISTORY.rst entry.
1313
VERSION = '0.1.1'
14+
try:
15+
from azext_datadog.manual.version import VERSION
16+
except ImportError:
17+
pass
1418

1519
# The full list of classifiers is available at
1620
# https://pypi.python.org/pypi?%3Aaction=list_classifiers

src/datafactory/setup.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,10 @@
1111

1212
# HISTORY.rst entry.
1313
VERSION = "1.0.3"
14+
try:
15+
from azext_datafactory.manual.version import VERSION
16+
except ImportError:
17+
pass
1418

1519
# The full list of classifiers is available at
1620
# https://pypi.python.org/pypi?%3Aaction=list_classifiers

0 commit comments

Comments
 (0)