summaryrefslogtreecommitdiff
path: root/setup.py
diff options
context:
space:
mode:
authorClaudiu Popa <pcmanticore@gmail.com>2015-12-11 09:14:43 +0200
committerClaudiu Popa <pcmanticore@gmail.com>2015-12-11 13:52:19 +0200
commit3950486e27c67e1dc318446134cca44cc9724dc6 (patch)
treedb17b9406edce1df47696f5a56b8c7f4a4ff29af /setup.py
parent2cebc765290c7f2f082bd20ac6fdeaac8b3dcf47 (diff)
downloadastroid-git-3950486e27c67e1dc318446134cca44cc9724dc6.tar.gz
Include a travis.yml file for configuring Travis builds
This patch also brings a couple of small changes to the setup.py file, in order to make it work installing from another directory.
Diffstat (limited to 'setup.py')
-rw-r--r--setup.py9
1 files changed, 6 insertions, 3 deletions
diff --git a/setup.py b/setup.py
index e03d6433..e143a2b9 100644
--- a/setup.py
+++ b/setup.py
@@ -22,17 +22,20 @@ import os
from setuptools import setup, find_packages
from setuptools.command import install_lib
-pkginfo = 'astroid/__pkginfo__.py'
+
+real_path = os.path.realpath(__file__)
+astroid_dir = os.path.dirname(real_path)
+pkginfo = os.path.join(astroid_dir, 'astroid', '__pkginfo__.py')
with open(pkginfo, 'rb') as fobj:
exec(compile(fobj.read(), pkginfo, 'exec'), locals())
-with open('README') as fobj:
+with open(os.path.join(astroid_dir, 'README.rst')) as fobj:
long_description = fobj.read()
class AstroidInstallLib(install_lib.install_lib):
def byte_compile(self, files):
- test_datadir = os.path.join('astroid', 'tests', 'testdata')
+ test_datadir = os.path.join(astroid_dir, 'tests', 'testdata')
files = [f for f in files if test_datadir not in f]
install_lib.install_lib.byte_compile(self, files)