Skip to content

Commit 91736df

Browse files
committed
Try to package myPackage or myFramework.Extension with same setup-routine.
1 parent d190b1a commit 91736df

3 files changed

Lines changed: 9 additions & 7 deletions

File tree

.github/workflows/Package.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,8 @@ jobs:
4949
Package:
5050
name: 📦 Package in Source and Wheel Format
5151
runs-on: "ubuntu-${{ inputs.ubuntu_image_version }}"
52-
52+
env:
53+
artifact: ${{ inputs.artifact }}
5354
steps:
5455
- name: ⏬ Checkout repository
5556
uses: actions/checkout@v5

.github/workflows/Parameters.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -251,7 +251,7 @@ jobs:
251251
from typing import Iterable
252252
253253
python_version = "${{ steps.variables.outputs.python_version }}"
254-
name = "${{ steps.artifacts.outputs.artifact_base }}"
254+
name = "${{ steps.variables.outputs.artifact_basename }}"
255255
systems = "${{ inputs.system_list }}".strip()
256256
versions = "${{ inputs.python_version_list }}".strip()
257257
include_list = "${{ inputs.include_list }}".strip()

setup.py

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -28,21 +28,22 @@
2828
# SPDX-License-Identifier: Apache-2.0 #
2929
# ==================================================================================================================== #
3030
#
31-
"""Package installer for 'myPackage'."""
31+
"""Package installer for 'myPackage' or 'myFramework.Extension'."""
32+
from os import environ
33+
from pathlib import Path
3234
from setuptools import setup
3335

34-
from pathlib import Path
3536
from pyTooling.Packaging import DescribePythonPackageHostedOnGitHub
3637

3738
gitHubNamespace = "pyTooling"
38-
packageName = "myPackage"
39-
packageDirectory = packageName
39+
packageName = "myPackage" if "." not in environ["artifact"] else "myFramework.Extension"
40+
packageDirectory = packageName.replace(".", "/")
4041
packageInformationFile = Path(f"{packageDirectory}/__init__.py")
4142

4243
setup(
4344
**DescribePythonPackageHostedOnGitHub(
4445
packageName=packageName,
45-
description="myPackage is a test package to verify GitHub actions for Python projects.",
46+
description=f"{packageName} is a test package to verify GitHub actions for Python projects.",
4647
gitHubNamespace=gitHubNamespace,
4748
unittestRequirementsFile=Path("tests/unit/requirements.txt"),
4849
sourceFileWithVersion=packageInformationFile,

0 commit comments

Comments
 (0)