Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/deployment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ jobs:
git show
# If we're making a release, pin DIRACCommon to exact version
python .github/workflows/pin_diraccommon_version.py "$NEW_VERSION"
git add setup.cfg
git add pyproject.toml
git commit -m "chore: Pin DIRACCommon to $NEW_VERSION"
git show
# Create the tag
Expand Down
14 changes: 7 additions & 7 deletions .github/workflows/pin_diraccommon_version.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/usr/bin/env python3
"""
Pin DIRACCommon version in setup.cfg during deployment.
Pin DIRACCommon version in pyproject.toml during deployment.

This script is used during the deployment process to ensure DIRAC
depends on the exact version of DIRACCommon being released.
Expand Down Expand Up @@ -31,19 +31,19 @@ def get_diraccommon_version():


def pin_diraccommon_version(version):
"""Pin DIRACCommon to exact version in setup.cfg."""
setup_cfg = Path("setup.cfg")
content = setup_cfg.read_text()
"""Pin DIRACCommon to exact version in pyproject.toml."""
pyproject_toml = Path("pyproject.toml")
content = pyproject_toml.read_text()

# Replace the DIRACCommon line with exact version pin
updated_content = re.sub(r"^(\s*)DIRACCommon\s*$", f"\\1DIRACCommon=={version}", content, flags=re.MULTILINE)

if content == updated_content:
print(f"Warning: DIRACCommon line not found or already pinned in setup.cfg")
print(f"Warning: DIRACCommon line not found or already pinned in pyproject.toml")
return False

setup_cfg.write_text(updated_content)
print(f"Pinned DIRACCommon to version {version} in setup.cfg")
pyproject_toml.write_text(updated_content)
print(f"Pinned DIRACCommon to version {version} in pyproject.toml")
return True


Expand Down
2 changes: 1 addition & 1 deletion MANIFEST.in
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@ prune *
graft src
# graft tests

include LICENSE README.rst pyproject.toml setup.py setup.cfg
include LICENSE README.rst pyproject.toml
global-exclude __pycache__ *.py[cod] .*
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
This is the servicesList: MyService
We are done with detail report.
"""

from DIRAC import S_OK, S_ERROR, gLogger, exit as DIRACExit
from DIRAC.Core.Base.Script import Script

Expand Down Expand Up @@ -91,7 +92,7 @@ def parseSwitchesAndPositionalArguments():
return switches, repType, user, services


# IMPORTANT: Make sure to add the console-scripts entry to setup.cfg as well!
# IMPORTANT: Make sure to add the console-scripts entry to pyproject.toml as well!
@Script()
def main():
"""
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ All scripts should live in the *scripts* directory of their parent system. For i

will live in `src/DIRAC/WorkloadManagementSystem/scripts/dirac_wms_job_submit.py`.

Scripts become command line scripts when DIRAC is pip-installed, using the `console_scripts entry point <https://setuptools.pypa.io/en/latest/userguide/entry_point.html>`_, meaning that new scripts should be added to the list in `setup.cfg file <https://github.com/DIRACGrid/DIRAC/blob/integration/setup.cfg>`_.
Scripts become command line scripts when DIRAC is pip-installed, using the `console_scripts entry point <https://setuptools.pypa.io/en/latest/userguide/entry_point.html>`_, meaning that new scripts should be added to the list in `pyproject.toml file <https://github.com/DIRACGrid/DIRAC/blob/integration/pyproject.toml>`_.


Coding commands
Expand Down
358 changes: 307 additions & 51 deletions pyproject.toml

Large diffs are not rendered by default.

335 changes: 0 additions & 335 deletions setup.cfg

This file was deleted.

4 changes: 0 additions & 4 deletions setup.py

This file was deleted.

Loading