Skip to content

Commit

Permalink
Eliminate psutil/beautifulsoup4 dependencies (#79)
Browse files Browse the repository at this point in the history
Importing `tracer.version` in the setup.py file yields the
evaluation of `tracer/__init__.py` - which ultimately leads to
the importing of psutil/beautifulsoup4.

Thus, a `pip install .` fails on a minimal system (that doesn't
already have those packages installed). For example when you are
in a Python virtual environment.

Note: if you want to test tracer in a virtual env you also have
to make the system's rpm package available (e.g. via linking
/usr/lib64/python2.7/site-packages/rpm to the virtual
site-packages directory).
  • Loading branch information
gsauthof authored and sean797 committed Apr 25, 2017
1 parent 4a9281b commit d1f196d
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import os
import shutil
from distutils.core import setup
from tracer.version import __version__


if not os.path.exists('build/pip'):
Expand All @@ -12,13 +11,17 @@
with open("requirements.txt") as f:
install_requires = f.read().splitlines()

with open("tracer.spec") as f:
version = next(iter(filter(lambda l:l.startswith('Version:'),
f.read().splitlines()))).split()[1]

data_files = []
if hasattr(os, 'geteuid') and os.geteuid() == 0:
data_files = [('/etc/bash_completion.d', ['scripts/tracer.bash_completion']),]

setup(
name='tracer',
version=__version__,
version=version,
author='FrostyX',
author_email='frostyx@email.cz',
url='http://tracer-package.com/',
Expand Down

0 comments on commit d1f196d

Please sign in to comment.