chore: Remove nspkg (#910)
* Removed nspkg * Removed corresponding script logic * Still is probably VSTS configuration to do to go with these changes * Updated a old reference to "master" branch
This commit is contained in:
Родитель
2414e8f0a2
Коммит
cbc70e85a6
|
@ -50,7 +50,7 @@ The commit should contains one of the following structural elements as the \<typ
|
|||
|
||||
- `fix:` a commit of the type fix patches a bug in your codebase (this correlates with PATCH in semantic versioning).
|
||||
- `feat:` a commit of the type feat introduces a new feature to the codebase (this correlates with MINOR in semantic versioning).
|
||||
- Others: commit types other than `fix:` and `feat:` are allowed such as `chore:`, `docs:`, `style:`, `refactor:`, `perf:`, `test:`, and others. Refer to [@commitlint/config-conventional](https://github.com/conventional-changelog/commitlint/tree/master/%40commitlint/config-conventional) for a full list.
|
||||
- Others: commit types other than `fix:` and `feat:` are allowed such as `chore:`, `docs:`, `style:`, `refactor:`, `perf:`, `test:`, and others. Refer to [@commitlint/config-conventional](https://github.com/conventional-changelog/commitlint/tree/main/%40commitlint/config-conventional) for a full list.
|
||||
|
||||
If you are new to this convention you can use `npm run commit` instead of `git commit` and follow the guided instructions.
|
||||
|
||||
|
|
|
@ -1,5 +0,0 @@
|
|||
[bumpversion]
|
||||
current_version = 1.0.1
|
||||
parse = (?P<major>\d+)\.(?P<minor>\d+)\.(?P<patch>\d+)
|
||||
serialize = {major}.{minor}.{patch}
|
||||
|
|
@ -1,3 +0,0 @@
|
|||
include *.md
|
||||
include azure/__init__.py
|
||||
include azure/iot/__init__.py
|
|
@ -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.
|
|
@ -1 +0,0 @@
|
|||
__path__ = __import__("pkgutil").extend_path(__path__, __name__)
|
|
@ -1 +0,0 @@
|
|||
__path__ = __import__("pkgutil").extend_path(__path__, __name__)
|
|
@ -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,
|
||||
)
|
14
env_setup.py
14
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.
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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())
|
||||
|
|
|
@ -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'
|
||||
|
|
Загрузка…
Ссылка в новой задаче