cov-core / setup.py

Meme Dough b50e6a7 








Meme Dough 1e9e226 
Meme Dough b50e6a7 
Meme Dough 1e9e226 
Meme Dough b50e6a7 

Meme Dough a5d663e 

Meme Dough b50e6a7 
Meme Dough a5d663e 
Meme Dough b50e6a7 



Meme Dough 11d168c 
Meme Dough 69f3e3c 
Meme Dough b50e6a7 





Meme Dough a2ddd54 
Meme Dough b50e6a7 

















Meme Dough bc62935 
Meme Dough 12a89d7 
cwit...@cwlin.uk… a40213d 





Meme Dough a5d663e 



Meme Dough b50e6a7 
Meme Dough a5d663e 
import setuptools
import sys
import os

# The name of the path file must appear after easy-install.pth so that
# cov_core has been added to the sys.path and cov_core_init can be
# imported.
PTH_FILE_NAME = 'init_cov_core.pth'

# The line in the path file must begin with "import" so that site.py will exec it.
PTH_FILE = '''\
import os; os.environ.get('COV_CORE_SOURCE') and __import__('cov_core_init').init()
'''

PTH_FILE_FAILURE = '''
Subprocesses WILL NOT have coverage collected.

To measure subprocesses put the following in a pth file called %s:
%s
''' % (PTH_FILE_NAME, PTH_FILE)

setuptools.setup(name='cov-core',
                 version='1.7',
                 description='plugin core for use by pytest-cov, nose-cov and nose2-cov',
                 long_description=open('README.txt').read().strip(),
                 author='Meme Dough',
                 author_email='memedough@gmail.com',
                 url='http://bitbucket.org/memedough/cov-core/overview',
                 py_modules=['cov_core',
                             'cov_core_init'],
                 install_requires=['coverage>=3.4'],
                 license='MIT License',
                 zip_safe=False,
                 keywords='cover coverage',
                 classifiers=['Development Status :: 4 - Beta',
                              'Intended Audience :: Developers',
                              'License :: OSI Approved :: MIT License',
                              'Operating System :: OS Independent',
                              'Programming Language :: Python',
                              'Programming Language :: Python :: 2.4',
                              'Programming Language :: Python :: 2.5',
                              'Programming Language :: Python :: 2.6',
                              'Programming Language :: Python :: 2.7',
                              'Programming Language :: Python :: 3.0',
                              'Programming Language :: Python :: 3.1',
                              'Topic :: Software Development :: Testing'])

if sys.argv[1] in ('install', 'develop'):
    for path in sys.path:
        if (path.endswith('site-packages')) or (path.endswith('dist-packages') and 'local' in path):
            path = os.path.join(path, PTH_FILE_NAME)
            try:
                pth_file = open(path, 'w')
                pth_file.write(PTH_FILE)
                pth_file.close()
                sys.stdout.write('\nWrote pth file for subprocess measurement to %s\n' % path)
                break
            except Exception:
                sys.stdout.write('\nFailed to write pth file for subprocess measurement to %s\n' % path)
                sys.stdout.write(PTH_FILE_FAILURE)
                break
    else:
        sys.stdout.write('\nFailed to find site-packages or dist-packages dir to put pth file in.\n')
        sys.stdout.write(PTH_FILE_FAILURE)
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.