diff --git a/.gitea/workflows/rpmbuild-dispatch.yaml b/.gitea/workflows/rpmbuild-dispatch.yaml index 0063acb..c356ab6 100644 --- a/.gitea/workflows/rpmbuild-dispatch.yaml +++ b/.gitea/workflows/rpmbuild-dispatch.yaml @@ -1,5 +1,5 @@ name: Build and provide rpm of python3-expiringdict-rpm -run-name: Rpmbuild python3-expiringdict-rpm at { gitea.repository } by { github.actor } +run-name: Rpmbuild python3-expiringdict-rpm at ${{ gitea.repository }] by ${{ github.actor }} on: workflow_dispatch: inputs: @@ -13,7 +13,7 @@ on: - "f42-minimal-rpmbuild" jobs: rpmbuild: - runs-on: { inputs.runsonlabel } + runs-on: ${{ inputs.runsonlabel }} steps: - name: Check out repository code uses: https://git.demus.dk/actions/git-clone@main @@ -22,4 +22,4 @@ jobs: - name: Deploy to packages uses: https://git.demus.dk/actions/rpm-deploy@main with: - pat: { secrets.RPM_REPO_WRITE } + pat: ${{ secrets.RPM_REPO_WRITE }} diff --git a/.gitea/workflows/rpmbuild-release-41.yaml b/.gitea/workflows/rpmbuild-release-41.yaml index 92ccf1c..fb5914d 100644 --- a/.gitea/workflows/rpmbuild-release-41.yaml +++ b/.gitea/workflows/rpmbuild-release-41.yaml @@ -1,5 +1,5 @@ name: Build and provide rpm of python3-expiringdict-rpm -run-name: Rpmbuild python3-expiringdict-rpm by @{ github.actor } +run-name: Rpmbuild python3-expiringdict-rpm by ${{ github.actor }} on: [ release ] jobs: rpmbuild: @@ -12,4 +12,4 @@ jobs: - name: Deploy to packages uses: https://git.demus.dk/actions/rpm-deploy@main with: - pat: { secrets.RPM_REPO_WRITE } + pat: ${{ secrets.RPM_REPO_WRITE }} diff --git a/.gitea/workflows/rpmbuild-release-42.yaml b/.gitea/workflows/rpmbuild-release-42.yaml index ced8a5c..d0e1a93 100644 --- a/.gitea/workflows/rpmbuild-release-42.yaml +++ b/.gitea/workflows/rpmbuild-release-42.yaml @@ -1,5 +1,5 @@ name: Build and provide rpm of python3-expiringdict-rpm -run-name: Rpmbuild python3-expiringdict-rpm by @{ github.actor } +run-name: Rpmbuild python3-expiringdict-rpm by ${{ github.actor }} on: [ release ] jobs: rpmbuild: @@ -12,4 +12,4 @@ jobs: - name: Deploy to packages uses: https://git.demus.dk/actions/rpm-deploy@main with: - pat: { secrets.RPM_REPO_WRITE } + pat: ${{ secrets.RPM_REPO_WRITE }} diff --git a/.gitea/workflows/rpmbuild-release-rawhide.yaml b/.gitea/workflows/rpmbuild-release-rawhide.yaml index 203d084..911d96d 100644 --- a/.gitea/workflows/rpmbuild-release-rawhide.yaml +++ b/.gitea/workflows/rpmbuild-release-rawhide.yaml @@ -1,5 +1,5 @@ name: Build and provide rpm of python3-expiringdict-rpm -run-name: Rpmbuild python3-expiringdict-rpm by @{ github.actor } +run-name: Rpmbuild python3-expiringdict-rpm by ${{ github.actor }} on: [ release ] jobs: rpmbuild: @@ -12,4 +12,4 @@ jobs: - name: Deploy to packages uses: https://git.demus.dk/actions/rpm-deploy@main with: - pat: { secrets.RPM_REPO_WRITE } + pat: ${{ secrets.RPM_REPO_WRITE }} diff --git a/python-expiringdict.conf b/python-expiringdict.conf new file mode 100644 index 0000000..15c4353 --- /dev/null +++ b/python-expiringdict.conf @@ -0,0 +1,12 @@ +archful = false +archive_name = "expiringdict-1.2.2.tar.gz" +extras = [ + "tests", +] +license_files_present = true +pypi_name = "expiringdict" +pypi_version = "1.2.2" +python_name = "python-expiringdict" +source = "PyPI" +summary = "Dictionary with auto-expiring values for caching purposes" +url = "https://www.mailgun.com/" diff --git a/python-expiringdict.spec b/python-expiringdict.spec new file mode 100644 index 0000000..26b3798 --- /dev/null +++ b/python-expiringdict.spec @@ -0,0 +1,61 @@ +Name: python-expiringdict +Version: 1.2.2 +Release: %autorelease +Summary: Dictionary with auto-expiring values for caching purposes + +License: Apache-1.1 +URL: https://www.mailgun.com/ +Source: %{pypi_source expiringdict} + +BuildArch: noarch +BuildRequires: python3-devel + +%global _description %{expand: +expiringdict is a Python caching library. The core of the library is +ExpiringDict class which is an ordered dictionary with auto-expiring +values for caching purposes. Expiration happens on any access, object +is locked during cleanup from expired values. ExpiringDict can not +store more than max_len elements - the oldest will be deleted. + +Note: Iteration over dict and also keys() do not remove expired values!} + +%description %_description + +%package -n python3-expiringdict +Summary: %{summary} + +%description -n python3-expiringdict %_description + +# For official Fedora packages, review which extras should be actually packaged +# See: https://docs.fedoraproject.org/en-US/packaging-guidelines/Python/#Extras +%pyproject_extras_subpkg -n python3-expiringdict tests + + +%prep +%autosetup -p1 -n expiringdict-%{version} + + +%generate_buildrequires +# Keep only those extras which you actually want to package or use during tests +%pyproject_buildrequires -x tests + + +%build +%pyproject_wheel + + +%install +%pyproject_install +# Add top-level Python module names here as arguments, you can use globs +%pyproject_save_files -l expiringdict + + +%check +%pyproject_check_import + + +%files -n python3-expiringdict -f %{pyproject_files} + + +%changelog +%autochangelog \ No newline at end of file