Skip to content
This repository has been archived by the owner on Oct 10, 2020. It is now read-only.

Commit

Permalink
build-sys: Avoid self-dependency in setup.py
Browse files Browse the repository at this point in the history
The earlier 58a6e0e and later
455fc84 both break if the atomic
package is not actually installed on the system - as will be the case
with `mock/pbuilder` style builds.

It looks like OpenStack uses https://pypi.python.org/pypi/pbr which
presumably solves this problem.  I however am not super interested
right now in diving into that...I just want the thing to build.

Ansible just inserts the current dir in `sys.path`, which seems like a
simple hack, so let's do that.
  • Loading branch information
cgwalters committed Aug 13, 2015
1 parent f7e2b86 commit 1068788
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
#!/usr/bin/env python

# Author: Dan Walsh <dwalsh@redhat.com>
import sys
import os
from setuptools import setup
import pkg_resources

__version__ = pkg_resources.require('Atomic')[0].version
sys.path.insert(0, os.path.abspath(os.getcwd()))
from Atomic import __version__

with open('requirements.txt') as f:
requirements = f.read().splitlines()
Expand Down

0 comments on commit 1068788

Please sign in to comment.