Skip to content

Commit

Permalink
Merge pull request pytest-dev#56 from xoviat/common_setup
Browse files Browse the repository at this point in the history
allow installation from source using pip
  • Loading branch information
eeaston authored May 23, 2017
2 parents 10a7b75 + 9847592 commit 586ab63
Show file tree
Hide file tree
Showing 14 changed files with 54 additions and 3 deletions.
8 changes: 5 additions & 3 deletions common_setup.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# Common setup.py code shared between all the projects in this repository
import sys
import os
import logging

from setuptools.command.test import test as TestCommand
Expand Down Expand Up @@ -30,9 +31,10 @@ def run_tests(self):


def common_setup(src_dir):
readme_file = 'README.md'
changelog_file = 'CHANGES.md'
version_file = 'VERSION'
this_dir = os.path.dirname(__file__)
readme_file = os.path.join(this_dir, 'README.md')
changelog_file = os.path.join(this_dir, 'CHANGES.md')
version_file = os.path.join(this_dir, 'VERSION')

# Convert Markdown to RST for PyPI
try:
Expand Down
4 changes: 4 additions & 0 deletions pytest-devpi-server/setup.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
import sys
import os
sys.path.append(os.path.dirname(os.path.dirname(__file__)))

from setuptools import setup, find_packages
from common_setup import common_setup

Expand Down
4 changes: 4 additions & 0 deletions pytest-fixture-config/setup.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
import sys
import os
sys.path.append(os.path.dirname(os.path.dirname(__file__)))

from setuptools import setup
from common_setup import common_setup

Expand Down
3 changes: 3 additions & 0 deletions pytest-git/setup.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
import sys
import os
sys.path.append(os.path.dirname(os.path.dirname(__file__)))

from setuptools import setup
from common_setup import common_setup

Expand Down
3 changes: 3 additions & 0 deletions pytest-listener/setup.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
import sys
import os
sys.path.append(os.path.dirname(os.path.dirname(__file__)))

from setuptools import setup, find_packages
from common_setup import common_setup

Expand Down
4 changes: 4 additions & 0 deletions pytest-profiling/setup.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
import sys
import os
sys.path.append(os.path.dirname(os.path.dirname(__file__)))

from setuptools import setup
from common_setup import common_setup

Expand Down
4 changes: 4 additions & 0 deletions pytest-pyramid-server/setup.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
import sys
import os
sys.path.append(os.path.dirname(os.path.dirname(__file__)))

from setuptools import setup
from common_setup import common_setup

Expand Down
4 changes: 4 additions & 0 deletions pytest-qt-app/setup.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
import sys
import os
sys.path.append(os.path.dirname(os.path.dirname(__file__)))

from setuptools import setup
from common_setup import common_setup

Expand Down
4 changes: 4 additions & 0 deletions pytest-server-fixtures/setup.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
import sys
import os
sys.path.append(os.path.dirname(os.path.dirname(__file__)))

from setuptools import setup, find_packages
from common_setup import common_setup

Expand Down
4 changes: 4 additions & 0 deletions pytest-shutil/setup.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
import sys
import os
sys.path.append(os.path.dirname(os.path.dirname(__file__)))

from setuptools import setup, find_packages
from common_setup import common_setup

Expand Down
3 changes: 3 additions & 0 deletions pytest-svn/setup.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
import sys
import os
sys.path.append(os.path.dirname(os.path.dirname(__file__)))

from setuptools import setup
from common_setup import common_setup

Expand Down
4 changes: 4 additions & 0 deletions pytest-verbose-parametrize/setup.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
import sys
import os
sys.path.append(os.path.dirname(os.path.dirname(__file__)))

from setuptools import setup
from common_setup import common_setup

Expand Down
4 changes: 4 additions & 0 deletions pytest-virtualenv/setup.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
import sys
import os
sys.path.append(os.path.dirname(os.path.dirname(__file__)))

from setuptools import setup
from common_setup import common_setup

Expand Down
4 changes: 4 additions & 0 deletions pytest-webdriver/setup.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
import sys
import os
sys.path.append(os.path.dirname(os.path.dirname(__file__)))

from setuptools import setup
from common_setup import common_setup

Expand Down

0 comments on commit 586ab63

Please sign in to comment.