diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md index ce2280f3b..356450c03 100644 --- a/.github/CONTRIBUTING.md +++ b/.github/CONTRIBUTING.md @@ -50,7 +50,7 @@ The commit should contains one of the following structural elements as the \\d+)\.(?P\d+)\.(?P\d+) -serialize = {major}.{minor}.{patch} - diff --git a/azure-iot-nspkg/MANIFEST.in b/azure-iot-nspkg/MANIFEST.in deleted file mode 100644 index 9e1772acb..000000000 --- a/azure-iot-nspkg/MANIFEST.in +++ /dev/null @@ -1,3 +0,0 @@ -include *.md -include azure/__init__.py -include azure/iot/__init__.py \ No newline at end of file diff --git a/azure-iot-nspkg/README.md b/azure-iot-nspkg/README.md deleted file mode 100644 index b181eecfc..000000000 --- a/azure-iot-nspkg/README.md +++ /dev/null @@ -1,9 +0,0 @@ -# Microsoft Azure IoT Libraries for Python - -This is the Microsoft IoT namespace package. - -This package is not intended to be installed directly by the end user. - -Since Python 3.0, this is a Python 2.x package **only**, Python 3.x libraries will use [PEP420](https://www.python.org/dev/peps/pep-0420/) as a namespace package strategy. To avoid issues package servers that do not support `python_requires`, a Python 3.x package is installed, but is empty. - -It provides the necessary files for other packages to extend the `azure.iot` namespace. \ No newline at end of file diff --git a/azure-iot-nspkg/azure/__init__.py b/azure-iot-nspkg/azure/__init__.py deleted file mode 100644 index 8db66d3d0..000000000 --- a/azure-iot-nspkg/azure/__init__.py +++ /dev/null @@ -1 +0,0 @@ -__path__ = __import__("pkgutil").extend_path(__path__, __name__) diff --git a/azure-iot-nspkg/azure/iot/__init__.py b/azure-iot-nspkg/azure/iot/__init__.py deleted file mode 100644 index 8db66d3d0..000000000 --- a/azure-iot-nspkg/azure/iot/__init__.py +++ /dev/null @@ -1 +0,0 @@ -__path__ = __import__("pkgutil").extend_path(__path__, __name__) diff --git a/azure-iot-nspkg/setup.py b/azure-iot-nspkg/setup.py deleted file mode 100644 index fc274524c..000000000 --- a/azure-iot-nspkg/setup.py +++ /dev/null @@ -1,67 +0,0 @@ -# ------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -------------------------------------------------------------------------- - -import sys -from setuptools import setup -from io import open # io.open needed for Python 2 compat - -# azure v0.x is not compatible with this package -# azure v0.x used to have a __version__ attribute (newer versions don't) -try: - import azure - - try: - ver = azure.__version__ - raise Exception( - "This package is incompatible with azure=={}. ".format(ver) - + 'Uninstall it with "pip uninstall azure".' - ) - except AttributeError: - pass -except ImportError: - pass - - -with open("README.md", "r") as fh: - _long_description = fh.read() - - -PACKAGES = [] -# Do an empty package on Python 3 and not python_requires, since not everybody is ready -# https://github.com/Azure/azure-sdk-for-python/issues/3447 -# https://github.com/Azure/azure-sdk-for-python/issues/3481 -if sys.version_info[0] < 3: - PACKAGES = ["azure.iot"] - - -setup( - name="azure-iot-nspkg", - version="1.0.1", - description="Microsoft Azure IoT Namespace Package [Internal]", - long_description=_long_description, - long_description_content_type="text/markdown", - license="MIT License", - author="Microsoft Corporation", - author_email="opensource@microsoft.com", - url="https://github.com/Azure/azure-iot-sdk-python/tree/main/azure-iot-nspkg", - classifiers=[ - "Development Status :: 3 - Alpha", - "Intended Audience :: Developers", - "Topic :: Software Development :: Libraries :: Python Modules", - "License :: OSI Approved :: MIT License", - "Programming Language :: Python", - "Programming Language :: Python :: 2", - "Programming Language :: Python :: 2.7", - "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.4", - "Programming Language :: Python :: 3.5", - "Programming Language :: Python :: 3.6", - "Programming Language :: Python :: 3.7", - ], - install_requires=["azure-nspkg>=3.0.0"], - packages=PACKAGES, - zip_safe=False, -) diff --git a/env_setup.py b/env_setup.py index 728621ea9..c9e088f39 100644 --- a/env_setup.py +++ b/env_setup.py @@ -35,23 +35,11 @@ if __name__ == "__main__": ) args = parser.parse_args() - ns_packages = [os.path.dirname(p) for p in glob.glob("azure*nspkg/setup.py")] - packages = [ - os.path.dirname(p) - for p in glob.glob("azure*/setup.py") - if os.path.dirname(p) not in ns_packages - ] + packages = [os.path.dirname(p) for p in glob.glob("azure*/setup.py")] # Make sure pip is on the latest version pip_command("install --upgrade pip") - # Install nspkgs first (2.7 only) - if sys.version_info < (3, 0, 0): - for package_name in ns_packages: - # Use an eager upgrade strategy to make sure we have all the latest dependencies. - # This way we will be running into any dependency-related bugs before customers do. - pip_command("install -U --upgrade-strategy eager -e {}".format(package_name)) - # Install packages for package_name in packages: # Use an eager upgrade strategy to make sure we have all the latest dependencies. diff --git a/scripts/build-release.ps1 b/scripts/build-release.ps1 index 3c4393aab..748cf48ac 100644 --- a/scripts/build-release.ps1 +++ b/scripts/build-release.ps1 @@ -34,11 +34,6 @@ function Build { Version = $env:device_version_part } - $packages["azure-iot-nspkg"] = [PSCustomObject]@{ - File = "setup.py" - Version = $env:nspkg_version_part - } - $packages["azure-iot-hub"] = [PSCustomObject]@{ File = "azure\iot\hub\constant.py" Version = $env:hub_version_part diff --git a/test_packages.py b/test_packages.py index 47c7c520f..891741eae 100644 --- a/test_packages.py +++ b/test_packages.py @@ -13,11 +13,10 @@ from subprocess import check_call if __name__ == "__main__": - # All packages in the monorepo, except nspkg - packages = [os.path.dirname(p) for p in glob.glob("azure*/setup.py") if "nspkg" not in p] + # All packages in the monorepo + packages = [os.path.dirname(p) for p in glob.glob("azure*/setup.py")] for package_name in packages: - if "nspkg" not in package_name: - command = "pytest {} --junitxml=junit/{}-test-results.xml --cov=azure --cov-report=xml:coverage.xml --cov-report=html:coverage --cov-append".format( - package_name, package_name - ) - check_call(command.split()) + command = "pytest {} --junitxml=junit/{}-test-results.xml --cov=azure --cov-report=xml:coverage.xml --cov-report=html:coverage --cov-append".format( + package_name, package_name + ) + check_call(command.split()) diff --git a/vsts/build-release.yml b/vsts/build-release.yml index 797df8afc..190e1f385 100644 --- a/vsts/build-release.yml +++ b/vsts/build-release.yml @@ -32,7 +32,6 @@ steps: dist: $(System.ArtifactsDirectory)\dist sources: $(Build.SourcesDirectory) device_version_part: $(azure-iot-device-version-part) - nspkg_version_part: $(azure-iot-nspkg-version-part) hub_version_part: $(azure-iot-hub-version-part) displayName: 'build release artifacts' @@ -42,28 +41,6 @@ steps: addToPath: true architecture: 'x64' -- task: CmdLine@2 - inputs: - script: | - IF [%VERSION%] EQU [] ( - echo Skipping azure-iot-nskpg Python2 build - GOTO EOF - ) - - pushd %LOCATION% - pip install wheel - python --version - python.exe setup.py bdist_wheel - robocopy /V %LOCATION%\dist %DIST%\azure-iot-nspkg - popd - IF %ERRORLEVEL% == 1 exit /b 0 - :EOF - env: - dist: $(System.ArtifactsDirectory)\dist - location: $(Build.SourcesDirectory)\azure-iot-nspkg - version: $(azure-iot-nspkg-version-part) - displayName: 'build nspkg for python2' - - task: PowerShell@2 inputs: targetType: 'inline'