diff --git a/Makefile b/Makefile index acf7eb3c8..833086ab0 100644 --- a/Makefile +++ b/Makefile @@ -39,7 +39,7 @@ check-zip: # Create package source distribution archive sdist: @echo -e "Generating python agent sdist package" - @python3.8 setup.py sdist + @python3.8 -m build --sdist @echo -e "\nDone." # Check local package source distribution archive contents, without install diff --git a/docker-compose.yml b/docker-compose.yml index 542dc06b8..2bcd753ea 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -20,11 +20,12 @@ services: entrypoint: ["/bin/bash", "-c"] command: - | + # build for sdist builds # boto3 for interaction with AWS # twine to upload to TestPyPi # tox for automated tests python3.8 -m pip install --upgrade pip - python3.8 -m pip install --default-timeout=100 boto3 twine tox + python3.8 -m pip install --default-timeout=100 build boto3 twine tox /bin/bash aarch64: @@ -40,9 +41,10 @@ services: entrypoint: ["/bin/bash", "-c"] command: - | + # build for sdist builds # boto3 for interaction with AWS # twine to upload to TestPyPi # tox for automated tests python3.8 -m pip install --upgrade pip - python3.8 -m pip install --default-timeout=100 boto3 twine tox + python3.8 -m pip install --default-timeout=100 build boto3 twine tox /bin/bash diff --git a/setup.py b/setup.py deleted file mode 100644 index 1420a5985..000000000 --- a/setup.py +++ /dev/null @@ -1,71 +0,0 @@ -#!/usr/bin/env python - -# © 2023 SolarWinds Worldwide, LLC. All rights reserved. -# -# Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at:http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. - -# pylint: disable-msg=missing-module-docstring -import logging -import os -import platform -import sys - -from setuptools import setup -from setuptools.command.build_ext import build_ext -from setuptools.command.build_py import build_py - - -logger = logging.getLogger(__name__) - -def is_alpine_distro(): - """Checks if current system is Alpine Linux.""" - if os.path.exists("/etc/alpine-release"): - return True - - try: - with open("/etc/os-release", 'r') as osr: - releases = osr.readlines() - releases = [l[:-1] for l in releases] - if 'NAME="Alpine Linux"' in releases: - return True - except (FileNotFoundError, IsADirectoryError) as ecp: - logger.info( - "[SETUP] Could not find /etc/os-release file. " - "Assuming distro not Alpine: {e}".format(e=ecp)) - except PermissionError as ecp: - logger.info( - "[SETUP] Permission denied for /etc/os-release. " - "Assuming distro not Alpine: {e}".format(e=ecp)) - except (IOError, ValueError) as ecp: - logger.info( - "[SETUP] Could not open or read /etc/os-release file. " - "Assuming distro not Alpine: {e}".format(e=ecp)) - except Exception as ecp: - logger.info( - "[SETUP] Something went wrong at is_alpine_distro. " - "Assuming distro not Alpine:: {e}".format(e=ecp)) - - return False - -def python_version_supported(): - if sys.version_info[0] == 3 and sys.version_info[1] >= 7: - return True - return False - -def os_supported(): - is_linux = sys.platform.startswith('linux') - is_x86_64_or_aarch64 = platform.machine() in ["x86_64", "aarch64"] - return is_linux and is_x86_64_or_aarch64 - -if not (python_version_supported() and os_supported()): - logger.warning( - "[SETUP] This package supports only Python 3.8 and above on Linux x86_64 or aarch64. " - "Other platform or python versions may not work as expected.") - -# Extra args in case old setuptools version -setup( - name="solarwinds_apm", - python_requires='>=3.8', -) diff --git a/solarwinds_apm/version.py b/solarwinds_apm/version.py index b953d20c9..434ce264e 100644 --- a/solarwinds_apm/version.py +++ b/solarwinds_apm/version.py @@ -1 +1 @@ -__version__ = "4.0.0.9" +__version__ = "4.0.0.10"