mirror of
https://github.com/pyTooling/Actions.git
synced 2026-02-12 02:56:56 +08:00
Try to package myPackage or myFramework.Extension with same setup-routine.
This commit is contained in:
3
.github/workflows/Package.yml
vendored
3
.github/workflows/Package.yml
vendored
@@ -49,7 +49,8 @@ jobs:
|
|||||||
Package:
|
Package:
|
||||||
name: 📦 Package in Source and Wheel Format
|
name: 📦 Package in Source and Wheel Format
|
||||||
runs-on: "ubuntu-${{ inputs.ubuntu_image_version }}"
|
runs-on: "ubuntu-${{ inputs.ubuntu_image_version }}"
|
||||||
|
env:
|
||||||
|
artifact: ${{ inputs.artifact }}
|
||||||
steps:
|
steps:
|
||||||
- name: ⏬ Checkout repository
|
- name: ⏬ Checkout repository
|
||||||
uses: actions/checkout@v5
|
uses: actions/checkout@v5
|
||||||
|
|||||||
2
.github/workflows/Parameters.yml
vendored
2
.github/workflows/Parameters.yml
vendored
@@ -251,7 +251,7 @@ jobs:
|
|||||||
from typing import Iterable
|
from typing import Iterable
|
||||||
|
|
||||||
python_version = "${{ steps.variables.outputs.python_version }}"
|
python_version = "${{ steps.variables.outputs.python_version }}"
|
||||||
name = "${{ steps.artifacts.outputs.artifact_base }}"
|
name = "${{ steps.variables.outputs.artifact_basename }}"
|
||||||
systems = "${{ inputs.system_list }}".strip()
|
systems = "${{ inputs.system_list }}".strip()
|
||||||
versions = "${{ inputs.python_version_list }}".strip()
|
versions = "${{ inputs.python_version_list }}".strip()
|
||||||
include_list = "${{ inputs.include_list }}".strip()
|
include_list = "${{ inputs.include_list }}".strip()
|
||||||
|
|||||||
11
setup.py
11
setup.py
@@ -28,21 +28,22 @@
|
|||||||
# SPDX-License-Identifier: Apache-2.0 #
|
# SPDX-License-Identifier: Apache-2.0 #
|
||||||
# ==================================================================================================================== #
|
# ==================================================================================================================== #
|
||||||
#
|
#
|
||||||
"""Package installer for 'myPackage'."""
|
"""Package installer for 'myPackage' or 'myFramework.Extension'."""
|
||||||
|
from os import environ
|
||||||
|
from pathlib import Path
|
||||||
from setuptools import setup
|
from setuptools import setup
|
||||||
|
|
||||||
from pathlib import Path
|
|
||||||
from pyTooling.Packaging import DescribePythonPackageHostedOnGitHub
|
from pyTooling.Packaging import DescribePythonPackageHostedOnGitHub
|
||||||
|
|
||||||
gitHubNamespace = "pyTooling"
|
gitHubNamespace = "pyTooling"
|
||||||
packageName = "myPackage"
|
packageName = "myPackage" if "." not in environ["artifact"] else "myFramework.Extension"
|
||||||
packageDirectory = packageName
|
packageDirectory = packageName.replace(".", "/")
|
||||||
packageInformationFile = Path(f"{packageDirectory}/__init__.py")
|
packageInformationFile = Path(f"{packageDirectory}/__init__.py")
|
||||||
|
|
||||||
setup(
|
setup(
|
||||||
**DescribePythonPackageHostedOnGitHub(
|
**DescribePythonPackageHostedOnGitHub(
|
||||||
packageName=packageName,
|
packageName=packageName,
|
||||||
description="myPackage is a test package to verify GitHub actions for Python projects.",
|
description=f"{packageName} is a test package to verify GitHub actions for Python projects.",
|
||||||
gitHubNamespace=gitHubNamespace,
|
gitHubNamespace=gitHubNamespace,
|
||||||
unittestRequirementsFile=Path("tests/unit/requirements.txt"),
|
unittestRequirementsFile=Path("tests/unit/requirements.txt"),
|
||||||
sourceFileWithVersion=packageInformationFile,
|
sourceFileWithVersion=packageInformationFile,
|
||||||
|
|||||||
Reference in New Issue
Block a user