Skip to content

Instantly share code, notes, and snippets.

Last active November 8, 2016 17:55
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save chkumar246/cf75d421c9e6db68e05a710f31160239 to your computer and use it in GitHub Desktop.
Tempest Plugin entry-point separation macro
%define service manila
# Entry Point Macro
%define py2_entrypoint() \
egg_path=%{buildroot}%{python2_sitelib}/%{service}-*.egg-info \
tempest_egg_path=%{buildroot}%{python2_sitelib}/%{service}_tests.egg-info \
mkdir $tempest_egg_path \
grep "tempest\\|Tempest" %{service}.egg-info/entry_points.txt >$tempest_egg_path/entry_points.txt \
sed -i "/tempest\\|Tempest/d" $egg_path/entry_points.txt \
# echo 'Metadata-Version: 1.1\nName: %{service}-tests\nVersion: %{upstream_version}\nSummary: %{summary} Tempest Plugin\n' >> $tempest_egg_path/PKG-INFO \
# How to call this macro
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment