From e3f7aafc0aaa69f5fca998e05b06d2f23d492f02 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Thu, 13 Aug 2026 19:55:50 +0000 Subject: [PATCH 1/5] chore: migrate setup.py to pyproject.toml with setuptools-scm and GitHub Actions publish workflow Co-authored-by: swainn <5123221+swainn@users.noreply.github.com> --- .github/workflows/publish.yml | 51 +++++++++++++++++++++++++++++++++++ pyproject.toml | 23 ++++++++++++++++ setup.py | 49 --------------------------------- 3 files changed, 74 insertions(+), 49 deletions(-) create mode 100644 .github/workflows/publish.yml create mode 100644 pyproject.toml delete mode 100644 setup.py diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml new file mode 100644 index 0000000..65102d0 --- /dev/null +++ b/.github/workflows/publish.yml @@ -0,0 +1,51 @@ +name: Publish to PyPI + +on: + push: + tags: + - "v*" + +jobs: + build: + name: Build distribution + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + with: + fetch-depth: 0 + + - name: Set up Python + uses: actions/setup-python@v5 + with: + python-version: "3.x" + + - name: Install build + run: python -m pip install build + + - name: Build package + run: python -m build + + - name: Upload distribution artifacts + uses: actions/upload-artifact@v4 + with: + name: dist + path: dist/ + + publish: + name: Publish to PyPI + needs: build + runs-on: ubuntu-latest + environment: + name: pypi + url: https://pypi.org/p/condorpy + permissions: + id-token: write + steps: + - name: Download distribution artifacts + uses: actions/download-artifact@v4 + with: + name: dist + path: dist/ + + - name: Publish to PyPI + uses: pypa/gh-action-pypi-publish@release/v1 diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 0000000..948d1b2 --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,23 @@ +[build-system] +requires = ["setuptools>=64", "setuptools-scm>=8"] +build-backend = "setuptools.backends.legacy:build" + +[project] +name = "condorpy" +dynamic = ["version"] +description = "A Python wrapper for HTCondor's cli" +readme = "README.rst" +license = { text = "BSD 2-Clause License" } +authors = [ + { name = "Scott Christensen", email = "sdc50@byu.net" }, +] +keywords = ["htcondor", "distributed-computing", "job-scheduling"] +dependencies = ["scp", "paramiko"] + +[project.urls] +Homepage = "http://tethysplatform.org/condorpy/" + +[tool.setuptools.packages.find] +where = ["."] + +[tool.setuptools_scm] diff --git a/setup.py b/setup.py deleted file mode 100644 index f2dbb25..0000000 --- a/setup.py +++ /dev/null @@ -1,49 +0,0 @@ -# Copyright (c) 2015 Scott Christensen -# -# This file is part of condorpy -# -# condorpy is free software: you can redistribute it and/or modify it under -# the terms of the BSD 2-Clause License. A copy of the BSD 2-Clause License -# should have been distributed with this file. - -from setuptools import setup, find_packages -import os, re - -with open(os.path.join(os.path.dirname(__file__), 'README.rst')) as readme: - README = readme.read() - -# allow setup.py to be run from any path -os.chdir(os.path.normpath(os.path.join(os.path.abspath(__file__), os.pardir))) - -VERSION = re.search(':Version: ([\.?\d]*)', README).group(1) - -setup( - name="condorpy", - version=VERSION, - packages=find_packages(), - #scripts=['say_hello.py'], - - # Project uses reStructuredText, so ensure that the docutils get - # installed or upgraded on the target machine - install_requires=['scp', 'paramiko'], - - -# package_data = { -# # If any package contains *.txt or *.rst files, include them: -# '': ['*.txt', '*.rst'], -# # And include any *.msg files found in the 'hello' package, too: -# 'hello': ['*.msg'], -# }, - - - # metadata for upload to PyPI - author="Scott Christensen", - author_email="sdc50@byu.net", - description="A Python wrapper for HTCondor's cli", - long_description=README, - license="BSD 2-Clause License", - keywords="htcondor distributed-computing job-scheduling", - url="http://tethysplatform.org/condorpy/", - - # could also include download_url, classifiers, etc. -) \ No newline at end of file From a3685f62b926e08266a0824dead84030290e4aa1 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Thu, 13 Aug 2026 19:58:16 +0000 Subject: [PATCH 2/5] ci: add build test workflow for pull requests Co-authored-by: swainn <5123221+swainn@users.noreply.github.com> --- .github/workflows/build.yml | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 .github/workflows/build.yml diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..ea677d3 --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,24 @@ +name: Build Test + +on: + pull_request: + +jobs: + build: + name: Build distribution + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + with: + fetch-depth: 0 + + - name: Set up Python + uses: actions/setup-python@v5 + with: + python-version: "3.x" + + - name: Install build + run: python -m pip install build + + - name: Build package + run: python -m build From 8913067bfa1cac0849e4ff2aa16462c33f752182 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Thu, 13 Aug 2026 20:01:56 +0000 Subject: [PATCH 3/5] fix: use correct setuptools build backend in pyproject.toml Co-authored-by: swainn <5123221+swainn@users.noreply.github.com> --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 948d1b2..34a57f6 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [build-system] requires = ["setuptools>=64", "setuptools-scm>=8"] -build-backend = "setuptools.backends.legacy:build" +build-backend = "setuptools.build_meta" [project] name = "condorpy" From 8644ef9332d88128a17ce9580a810de8ff686225 Mon Sep 17 00:00:00 2001 From: Nathan Swain Date: Thu, 13 Aug 2026 14:39:03 -0600 Subject: [PATCH 4/5] Potential fix for pull request finding Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> --- .github/workflows/publish.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 65102d0..9f39a94 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -39,6 +39,7 @@ jobs: name: pypi url: https://pypi.org/p/condorpy permissions: + contents: read id-token: write steps: - name: Download distribution artifacts From 331c9e4cdc37d2b5bd68e08e5604f0acece1bd4f Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Thu, 13 Aug 2026 20:39:06 +0000 Subject: [PATCH 5/5] Update setup.py references to pip install and update VERSION in README Co-authored-by: swainn <5123221+swainn@users.noreply.github.com> --- .travis.yml | 2 +- README.rst | 2 +- docs/source/index.rst | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index b096836..503fa96 100644 --- a/.travis.yml +++ b/.travis.yml @@ -47,7 +47,7 @@ install: - conda create -q -n test-environment python=$TRAVIS_PYTHON_VERSION scp paramiko - source activate test-environment - - python setup.py install + - pip install . - pip install coverage coveralls # command to run tests diff --git a/README.rst b/README.rst index fe17883..33cf0b5 100644 --- a/README.rst +++ b/README.rst @@ -2,7 +2,7 @@ CondorPy ======== :condorpy: Python interface for high throughput computing with HTCondor -:Version: 0.6.0 +:Version: see latest tag :Author: Scott Christensen :Team: Tethys Platform :Homepage: http://tethysplatform.org/condorpy/ diff --git a/docs/source/index.rst b/docs/source/index.rst index 15dc5a5..d2d62ea 100644 --- a/docs/source/index.rst +++ b/docs/source/index.rst @@ -37,7 +37,7 @@ Installing from Source ====================== :: - $ python setup.py install + $ pip install . Getting Started