Skip to content

Commit

Permalink
Deprecation Warning on RPM builds no longer causes exit
Browse files Browse the repository at this point in the history
  • Loading branch information
ocket8888 committed Jul 11, 2018
1 parent 34d08ad commit b1d451c
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,13 @@
# Connvitals needs to have a python3-prefix for rpm distributions (LEGACY - DEPRECATED)
pkgname = "connvitals"
if platform.linux_distribution(full_distribution_name=False)[0] in {'centos', 'fedora', 'redhat'}\
and "bdist_rpm" in sys.argv:
or "bdist_rpm" in sys.argv:

pkgname = "python3-"+pkgname
raise DeprecationWarning("The use of RPM packages is now deprecated, pip is the official,"\
" preferred install method.")
import warnings
warnings.simplefilter("always", category=DeprecationWarning)
warn = "The use of RPM packages is now deprecated, pip is the official, preferred install method."
warnings.warn(warn, category=DeprecationWarning)

here = os.path.abspath(os.path.dirname(__file__))

Expand Down

0 comments on commit b1d451c

Please sign in to comment.