diff --git a/.python-damo.spec.swp b/.python-damo.spec.swp deleted file mode 100644 index d46cf4521921d39d47a5f2483d84c688f3c75b4c..0000000000000000000000000000000000000000 Binary files a/.python-damo.spec.swp and /dev/null differ diff --git a/python-damo.spec b/python-damo.spec index 45b54cec823b8d93895d08c455bd2d0d2e920dee..4a9c576453a9f6ce35e90c0fca43291c2c477dea 100644 --- a/python-damo.spec +++ b/python-damo.spec @@ -1,7 +1,7 @@ %global _empty_manifest_terminate_build 0 Name: python-damo Version: 2.4.3 -Release: 3 +Release: 4 Summary: DAMON user-space tool License: GPL-2.0 URL: https://github.com/awslabs/damo @@ -36,6 +36,21 @@ make data access-aware memory management optimizations. %prep %autosetup -p 1 -n damo-%{version} +# from packaging/build.sh +for f in pyproject.toml setup.py; do + cp -p packaging/$f . +done + +mkdir -p src/damo +cp -p src/*.py src/damo/ + +for f in pyproject.toml setup.py; do + cp -p packaging/$f . +done +# remove shebang from the newly copied damo.py +sed -i '1{\@^#!/usr/bin/env python@d}' src/damo/damo.py +touch -r damo src/damo/damo.py +touch -r damo src/damo/__init__.py %build %pyproject_build @@ -44,7 +59,7 @@ make data access-aware memory management optimizations. %pyproject_install install -d -m755 %{buildroot}/%{_pkgdocdir} install -d -m755 %{buildroot}/%{_bindir} -install -m 755 damo %{buildroot}/%{_bindir}/ + if [ -d doc ]; then cp -arf doc %{buildroot}/%{_pkgdocdir}; fi if [ -d docs ]; then cp -arf docs %{buildroot}/%{_pkgdocdir}; fi if [ -d example ]; then cp -arf example %{buildroot}/%{_pkgdocdir}; fi @@ -78,6 +93,9 @@ mv %{buildroot}/doclist.lst . %doc CONTRIBUTING README.md SECURITY.md USAGE.md release_note %changelog +* Thu Nov 21 2024 changtao - 2.4.3-4 +- modify the spec file to install file to /usr/lib/python3.11/site-packages/damo/ + * Mon Nov 18 2024 changtao - 2.4.3-3 - modify the spec file to add /usr/bin/damo as install file