diff --git a/expandvars-1.1.1.tar.gz b/expandvars-1.1.1.tar.gz new file mode 100644 index 0000000000000000000000000000000000000000..391982fe7b55d4e87e4fb0b10282e45b0bf56ead Binary files /dev/null and b/expandvars-1.1.1.tar.gz differ diff --git a/python-expandvars.spec b/python-expandvars.spec new file mode 100644 index 0000000000000000000000000000000000000000..900fefd97fdddebfa931b4262f7da640263aec42 --- /dev/null +++ b/python-expandvars.spec @@ -0,0 +1,61 @@ +Name: python-expandvars +Version: 1.1.1 +Release: 1 +Summary: Expand system variables Unix style + +License: MIT +URL: https://github.com/sayanarijit/expandvars +Source: https://pypi.io/packages/source/e/expandvars/expandvars-%{version}.tar.gz + +#BuildSystem: pyproject +BuildArch: noarch + +BuildRequires: python3-devel +BuildRequires: python3-setuptools +BuildRequires: python3-pytest +BuildRequires: python3-pip +BuildRequires: python3-hatchling +BuildRequires: pyproject-rpm-macros + +%global common_description %{expand: +This module is inspired by GNU bash's variable expansion features. It can be +used as an alternative to Python's os.path.expandvars function. + +A good use case is reading config files with the flexibility of reading values +from environment variables using advanced features like returning a default +value if some variable is not defined.} + +%description %{common_description} + +%package -n python3-expandvars +Summary: %{summary} + +%description -n python3-expandvars %{common_description} + +%prep +%autosetup -n expandvars-%{version} +# Remove coverage options from pyproject.toml +sed -i "s/--cov[^[:blank:]'\"]*[[:blank:]]*//g" pyproject.toml + +%build +%pyproject_build + +%install +%pyproject_install + +%check -a +%pytest + +%files -n python3-expandvars +%license LICENSE +%doc README.md +%{python3_sitelib}/expandvars-%{version}*.dist-info/ +%{python3_sitelib}/expandvars.py +%{python3_sitelib}/__pycache__/* + + +%changelog +* Tue Sep 09 2025 Yu Peng - 1.1.1-1 +- Simplified build process +- Init project. +