Skip to content

Instantly share code, notes, and snippets.

@chkumar246
Last active Nov 8, 2016
Embed
What would you like to do?
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 \
%nil
# How to call this macro
%install
%py2_entrypoint
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment