Skip to content

Commit 508cdb1

Browse files
committed
chore: move from setup.cfg to pyproject.toml
1 parent c754792 commit 508cdb1

File tree

8 files changed

+319
-401
lines changed

8 files changed

+319
-401
lines changed

.github/workflows/deployment.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ jobs:
103103
git show
104104
# If we're making a release, pin DIRACCommon to exact version
105105
python .github/workflows/pin_diraccommon_version.py "$NEW_VERSION"
106-
git add setup.cfg
106+
git add pyproject.toml
107107
git commit -m "chore: Pin DIRACCommon to $NEW_VERSION"
108108
git show
109109
# Create the tag

.github/workflows/pin_diraccommon_version.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/usr/bin/env python3
22
"""
3-
Pin DIRACCommon version in setup.cfg during deployment.
3+
Pin DIRACCommon version in pyproject.toml during deployment.
44
55
This script is used during the deployment process to ensure DIRAC
66
depends on the exact version of DIRACCommon being released.
@@ -31,19 +31,19 @@ def get_diraccommon_version():
3131

3232

3333
def pin_diraccommon_version(version):
34-
"""Pin DIRACCommon to exact version in setup.cfg."""
35-
setup_cfg = Path("setup.cfg")
36-
content = setup_cfg.read_text()
34+
"""Pin DIRACCommon to exact version in pyproject.toml."""
35+
pyproject_toml = Path("pyproject.toml")
36+
content = pyproject_toml.read_text()
3737

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

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

45-
setup_cfg.write_text(updated_content)
46-
print(f"Pinned DIRACCommon to version {version} in setup.cfg")
45+
pyproject_toml.write_text(updated_content)
46+
print(f"Pinned DIRACCommon to version {version} in pyproject.toml")
4747
return True
4848

4949

MANIFEST.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@ prune *
22
graft src
33
# graft tests
44

5-
include LICENSE README.rst pyproject.toml setup.py setup.cfg
5+
include LICENSE README.rst pyproject.toml
66
global-exclude __pycache__ *.py[cod] .*

docs/source/DeveloperGuide/AddingNewComponents/DevelopingCommands/dirac_my_great_script.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
This is the servicesList: MyService
1010
We are done with detail report.
1111
"""
12+
1213
from DIRAC import S_OK, S_ERROR, gLogger, exit as DIRACExit
1314
from DIRAC.Core.Base.Script import Script
1415

@@ -91,7 +92,7 @@ def parseSwitchesAndPositionalArguments():
9192
return switches, repType, user, services
9293

9394

94-
# IMPORTANT: Make sure to add the console-scripts entry to setup.cfg as well!
95+
# IMPORTANT: Make sure to add the console-scripts entry to pyproject.toml as well!
9596
@Script()
9697
def main():
9798
"""

docs/source/DeveloperGuide/AddingNewComponents/DevelopingCommands/index.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ All scripts should live in the *scripts* directory of their parent system. For i
1818

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

21-
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>`_.
21+
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>`_.
2222

2323

2424
Coding commands

pyproject.toml

Lines changed: 307 additions & 51 deletions
Large diffs are not rendered by default.

setup.cfg

Lines changed: 0 additions & 335 deletions
This file was deleted.

setup.py

Lines changed: 0 additions & 4 deletions
This file was deleted.

0 commit comments

Comments
 (0)