Skip to content

Commit 520d236

Browse files
authored
Merge pull request #3 from casangi/CAS-14475
CAS-14475
2 parents c550271 + 4bcaedf commit 520d236

File tree

4 files changed

+46
-22
lines changed

4 files changed

+46
-22
lines changed

.github/workflows/pythonpublish.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ jobs:
2424
setuptools
2525
--user
2626
- name: Build a source distribution
27-
run: python3 setup.py sdist
27+
run: python3 -m build
2828
- name: Store the distribution packages
2929
uses: actions/upload-artifact@v4
3030
with:

README.md

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ Runtime data necessary for CASA operation.
77

88
## Release Instructions
99
1. Create a release branch with a version name (ie v1.6.2)
10-
2. Ensure the version number in setup.py on the branch is set correctly
10+
2. Ensure the version number in pyproject.toml on the branch is set correctly
1111
3. Create a tag of the release branch (ie v1.6.2-1)
1212
4. Github Action runs automatically to publish a pip package to pypi
1313

@@ -28,6 +28,24 @@ Also see the External Data section of casadocs for additional details
2828

2929
## Developers Instructions
3030
1. every push to the casaconfig repository will push a new wheel to [test pypi](https://test.pypi.org/project/casaconfig/#history)
31-
2. the version in setup.py must be updated before each push so that the wheel has a unique name (e.g. "1.2.3dev2", where "dev?" could be incremented during development)
31+
2. the version in pyproject.toml must be updated before each push so that the wheel has a unique name (e.g. "1.2.3dev2", where "dev?" could be incremented during development; see the [specification](https://packaging.python.org/en/latest/specifications/version-specifiers/#version-specifiers) for more information about valid version signifiers)
3232
3. When testing with a casatools build, "pip install" the development casaconfig wheel before running any tests - it may be installed before casatools is installed or after since the casatools build does not depend on casasconfig (uninstall any already installed casaconfig if necessary).
3333
4. For release, follow the above instructions.
34+
35+
Wheels can be built locally following the same process used by the CI actions. To install the build-system dependencies as defined in pyproject.toml and then generate a source distribution and wheel:
36+
```
37+
python3 -m pip install build setuptools --user
38+
python3 -m build
39+
```
40+
This will create:
41+
```
42+
casaconfig.egg-info
43+
├── PKG-INFO
44+
├── SOURCES.txt
45+
├── dependency_links.txt
46+
├── requires.txt
47+
└── top_level.txt
48+
dist
49+
├── casaconfig-[VERSION]-py3-none-any.whl
50+
└── casaconfig-[VERSION].tar.gz
51+
```

pyproject.toml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
[project]
2+
name = "casaconfig"
3+
version = "1.0.2"
4+
description = "CASA Operational Configuration Package"
5+
readme = 'README.md'
6+
authors = [
7+
{name = "National Radio Astronomy Observatory",email = "casa-feedback@nrao.edu"},
8+
]
9+
dependencies = [
10+
"certifi>=2023.5.7",
11+
]
12+
requires-python = ">=3.8"
13+
license = {file = "LICENSE"}
14+
15+
[project.urls]
16+
Homepage = "https://casa.nrao.edu/"
17+
Documentation = "https://casadocs.readthedocs.io/"
18+
Repository = "https://github.com/casangi/casaconfig.git"
19+
20+
[build-system]
21+
requires = ["setuptools"]
22+
build-backend = "setuptools.build_meta"
23+
24+
[tool.setuptools.packages]
25+
find = {}

setup.py

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

0 commit comments

Comments
 (0)