Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

packaging: update python versions to be supported, mark package as Pr… #875

4 changes: 2 additions & 2 deletions .github/workflows/python-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: ["3.8", "3.9", "3.10", "3.11"]
token: ["stable", "latest"]
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12", "3.13"]
token: ["stable"]

steps:
- name: Harden Runner
Expand Down
7 changes: 2 additions & 5 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,6 @@ jenkinsapi
.. image:: https://badge.fury.io/py/jenkinsapi.png
:target: http://badge.fury.io/py/jenkinsapi

.. image:: https://travis-ci.com/pycontribs/jenkinsapi.png?branch=master
:target: https://travis-ci.com/pycontribs/jenkinsapi

.. image:: https://codecov.io/gh/pycontribs/jenkinsapi/branch/master/graph/badge.svg
:target: https://codecov.io/gh/pycontribs/jenkinsapi

Expand Down Expand Up @@ -142,7 +139,7 @@ Python versions

The project has been tested against Python versions:

* 3.8 - 3.11
* 3.8 - 3.13
* 2.7 - last version compatible with Python 2.7 is tagged Py2 in repository and available on PyPi as version 0.3.13

Jenkins versions
Expand Down Expand Up @@ -177,4 +174,4 @@ The above copyright notice and this permission notice shall be included in all c

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

.. _Java: http://www.oracle.com/technetwork/java/javase/downloads/jre8-downloads-2133155.html
.. _Java: https://www.oracle.com/java/technologies/downloads/#java17
4 changes: 1 addition & 3 deletions doc/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,8 @@
# serve to show the default.
import logging
import jenkinsapi
import pkg_resources

dist = pkg_resources.working_set.by_key[jenkinsapi.__name__]
VERSION = RELEASE = dist.version
VERSION = RELEASE = jenkinsapi.__version__

if __name__ == "__main__":
logging.basicConfig()
Expand Down
6 changes: 0 additions & 6 deletions jenkinsapi/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,9 +93,3 @@
__docformat__ = "epytext"
# In case of jenkinsapi is not installed in 'develop' mode
__version__ = "0.3.13"
try:
import pkg_resources

__version__ = pkg_resources.working_set.by_key["jenkinsapi"].version
except (ImportError, KeyError):
pass
16 changes: 9 additions & 7 deletions jenkinsapi/utils/jenkins_launcher.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,10 @@
import requests
import queue
import threading
import tarfile
import subprocess
from pkg_resources import resource_stream
from urllib3 import Retry
from urllib.parse import urlparse
from tarfile import TarFile

from requests.adapters import HTTPAdapter

Expand Down Expand Up @@ -136,12 +135,15 @@ def update_war(self):
)

def update_config(self):
tarball = TarFile.open(
fileobj=resource_stream(
"jenkinsapi_tests.systests", "jenkins_home.tar.gz"
)
from jenkinsapi_tests import systests

file = os.path.join(
os.path.dirname(systests.__file__), "jenkins_home.tar.gz"
)
tarball.extractall(path=self.jenkins_home)

with open(file, "rb") as f:
with tarfile.open(fileobj=f, mode="r:gz") as tarball:
tarball.extractall(path=self.jenkins_home)

def install_plugins(self):
plugin_dest_dir = os.path.join(self.jenkins_home, "plugins")
Expand Down
12 changes: 5 additions & 7 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ description = "A Python API for accessing resources on a Jenkins continuous-inte
readme = "README.rst"
license = {text = "MIT license"}
classifiers = [
"Development Status :: 4 - Beta",
"Development Status :: 5 - Production/Stable",
"Environment :: Console",
"Intended Audience :: Developers",
"Intended Audience :: Information Technology",
Expand All @@ -24,19 +24,17 @@ classifiers = [
"Natural Language :: English",
"Operating System :: OS Independent",
"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.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Topic :: Software Development :: Testing",
"Topic :: Utilities",
]
requires-python = ">=2.7"
requires_python = ">=3.8"
dynamic = ["version"]
dependencies = [
"pytz>=2014.4",
Expand Down
10 changes: 4 additions & 6 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ summary = A Python API for accessing resources on a Jenkins continuous-integrati
description-file = README.rst
license = MIT
classifier =
Development Status :: 4 - Beta
Development Status :: 5 - Production/Stable
Environment :: Console
Intended Audience :: Developers
Intended Audience :: Information Technology
Expand All @@ -16,15 +16,13 @@ classifier =
Operating System :: OS Independent
Operating System :: OS Independent
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.8
Programming Language :: Python :: 3.9
Programming Language :: Python :: 3.10
Programming Language :: Python :: 3.11
Programming Language :: Python :: 3.12
Programming Language :: Python :: 3.13
Topic :: Software Development :: Testing
Topic :: Utilities

Expand Down
Loading