Example #1
0
    subprocess.check_call(["/bin/bash", "-c", 
      'cd %s; %s' % (fmindexV2_home, command)], **kwargs)
    
objects_files = [pjoin(fmindexV2_home,'fm_index.a'),
                    pjoin(ds_ssort_home, 'ds_ssort.a')]

fmindex_ext = Extension('fmindex._fmindex',
                        sources=['fmindex/src/fmindex_py.c'],
                        extra_objects=objects_files,
                        include_dirs=[fmindexV2_home, 
                                    ds_ssort_home,
                                    'fmindex/src'],
                      )

# Find all fmindex data files
fmi_files = [rpath(pjoin(root, f), package_path) for root, _, files in
            os.walk(fmindexV2_home) for f in files]

setup(
    name=DISTNAME,
    maintainer=AUTHORS,
    packages=['fmindex'],
    package_data={'fmindex': fmi_files},
    ext_modules=[fmindex_ext],
    include_dirs=numpy.distutils.misc_util.get_numpy_include_dirs(),
    maintainer_email=EMAIL,
    description=DESCRIPTION,
    license=LICENSE,
    url=URL,
    download_url=DOWNLOAD_URL,
    long_description=LONG_DESCRIPTION,
Example #2
0
  $ pip install cadnano
''' % (version)

LONG_DESCRIPTION = __doc__

PACKAGE_PATH = os.path.abspath(os.path.dirname(__file__))
MODULE_PATH = pjoin(PACKAGE_PATH, 'cadnano')
INSTALL_EXE_PATH = pjoin(MODULE_PATH, 'extras', 'install_exe')
TESTS_PATH = pjoin(MODULE_PATH, 'tests')
TEST_DATA_PATH = pjoin(TESTS_PATH, 'data')
IMAGES_PATH1 = pjoin(MODULE_PATH, 'gui', 'mainwindow', 'images')
IMAGES_PATH2 = pjoin(MODULE_PATH, 'gui', 'dialogs', 'images')

# batch files and launch scripts

test_files = [rpath(pjoin(root, f), MODULE_PATH) for root, _, files in
              os.walk(TESTS_PATH) for f in files]
test_data_files = [rpath(pjoin(root, f), MODULE_PATH) for root, _, files in
                   os.walk(TEST_DATA_PATH) for f in files]
cn_files = [rpath(pjoin(root, f), MODULE_PATH) for root, _, files in
            os.walk(IMAGES_PATH1) for f in files]
cn_files += [rpath(pjoin(root, f), MODULE_PATH) for root, _, files in
             os.walk(IMAGES_PATH2) for f in files]
cn_files += test_files + test_data_files

entry_points = {'console_scripts': [
                'cadnano = cadnano.bin.main:main',
                'cadnanoinstall = cadnano.extras.install_exe.cadnanoinstall:post_install'
                ]}

if sys.platform == 'win32':
Example #3
0
               input_text="Files or folders that end with this text should be excluded: ",
               function=lambda excl, path: os.path.splitext(
                   os.path.split(path)[1])[0].endswith(excl.data),
               ui_input=lambda m: tk.Entry(m),
               ui_edit=lambda m, excl: tk.Entry(m, textvariable=tk.StringVar(m, value=excl.data)),
               ui_submit=lambda e: e.get()),
 ExclusionType(code="ext", menu_text="Specific file extension",
               input_text="Files with this extension should be excluded (the . before the " +
                          "extension is needed): ",
               function=lambda excl, path: os.path.splitext(path)[1] == excl.data,
               ui_input=lambda m: tk.Entry(m),
               ui_edit=lambda m, excl: tk.Entry(m, textvariable=tk.StringVar(m, value=excl.data)),
               ui_submit=lambda e: e.get()),
 ExclusionType(code="directory", accepts_limitations=False, menu_text="Specific directory path",
               input_text="Folders with this absolute path will be excluded: ",
               function=lambda excl, path: os.path.isdir(path) and rpath(path) == rpath(excl.data),
               ui_input=lambda m: Fileview(master=m),
               ui_edit=lambda m, excl: Fileview(master=m, default_focus=excl.data),
               ui_submit=lambda e: e.get_focus_path()),
 ExclusionType(code="file", menu_text="Specific filename",
               input_text="Files with this name and extension will be excluded: ",
               function=lambda excl, path: os.path.isfile(path) and os.path.split(
                   path)[1] == excl.data,
               ui_input=lambda m: tk.Entry(m),
               ui_edit=lambda m, excl: tk.Entry(m, textvariable=tk.StringVar(m, value=excl.data)),
               ui_submit=lambda e: e.get()),
 ExclusionType(code="dir_name", menu_text="Specific directory name",
               input_text="Directories with this name will be excluded: ",
               function=lambda excl, path: os.path.isdir(path) and os.path.split(
                   path)[1] == excl.data,
               ui_input=lambda m: tk.Entry(m),
Example #4
0

def p3Build():
    # Build primer3
    p3build = subprocess.Popen(['make clean; make'], shell=True,
                               cwd=LIBPRIMER3_PATH)
    p3build.wait()

P3_BUILT = False


# Find all necessary primer3 binaries / data files to include with the package
p3_binaries = ['oligotm', 'ntthal', 'primer3_core']
p3_binary_fps = [pjoin(LIBPRIMER3_PATH, fn) for fn in p3_binaries]

thermo_files = [rpath(pjoin(root, f), MODULE_PATH) for root, _, files in
                os.walk(THERMO_PARAMS_PATH) for f in files]

test_files = [rpath(pjoin(root, f), MODULE_PATH) for root, _, files in
                os.walk(TESTS_PATH) for f in files]

p3_files = thermo_files + test_files + ['thermoanalysis.pxd', 'thermoanalysis.pyx']


# Insure that the copied binaries are executable
def makeExecutable(fp):
    ''' Adds the executable bit to the file at filepath `fp`
    '''
    mode = ((os.stat(fp).st_mode) | 0o555) & 0o7777
    setup_log.info("Adding executable bit to %s (mode is now %o)", fp, mode)
    os.chmod(fp, mode)
Example #5
0
    p3clean.wait()


def p3Build():
    # Build primer3
    p3build = subprocess.Popen(['make clean; make'], shell=True, 
                               cwd=LIBPRIMER3_PATH)
    p3build.wait()

P3_BUILT = False

# Find all necessary primer3 binaries / data files to include with the package
p3_binaries = ['oligotm', 'ntthal', 'primer3_core']
p3_binary_fps = [pjoin(LIBPRIMER3_PATH, fn) for fn in p3_binaries]

thermo_files = [rpath(pjoin(root, f), MODULE_PATH) for root, _, files in
                os.walk(THERMO_PARAMS_PATH) for f in files]

test_files = [rpath(pjoin(root, f), MODULE_PATH) for root, _, files in
                os.walk(TESTS_PATH) for f in files]

p3_files = thermo_files + test_files

# Insure that the copied binaries are executable
def makeExecutable(fp):
    ''' Adds the executable bit to the file at filepath `fp`
    '''
    mode = ((os.stat(fp).st_mode) | 0o555) & 0o7777
    setup_log.info("Adding executable bit to %s (mode is now %o)", fp, mode)
    os.chmod(fp, mode)
Example #6
0
UIC_PATH = pjoin(MODULE_PATH, 'uic')

search_path = pjoin(MODULE_PATH, '*.pyd')
filepath_list = glob.glob(search_path)
file_list = [os.path.basename(x) for x in filepath_list]

search_path = pjoin(MODULE_PATH, '*.pyi')
filepath_list = glob.glob(search_path)
file_list += [os.path.basename(x) for x in filepath_list]

search_path = pjoin(MODULE_PATH, '*.dll')
filepath_list = glob.glob(search_path)
file_list += [os.path.basename(x) for x in filepath_list]

package_files = [
    rpath(pjoin(root, f), MODULE_PATH) for root, _, files in os.walk(Qt5_PATH)
    for f in files
]

package_files += [
    rpath(pjoin(root, f), MODULE_PATH) for root, _, files in os.walk(UIC_PATH)
    for f in files
]

packages = find_packages()
setup(
    name='PyQt5',
    version='5.6.1',
    license='GPLv3',
    url='https://www.riverbankcomputing.com/software/pyqt/download5',
    description='PyQt5',
Qt5_PATH = pjoin(MODULE_PATH, 'Qt')
UIC_PATH = pjoin(MODULE_PATH, 'uic')

search_path = pjoin(MODULE_PATH, '*.pyd')
filepath_list = glob.glob(search_path)
file_list = [os.path.basename(x) for x in filepath_list]

search_path = pjoin(MODULE_PATH, '*.pyi')
filepath_list = glob.glob(search_path)
file_list += [os.path.basename(x) for x in filepath_list]

search_path = pjoin(MODULE_PATH, '*.dll')
filepath_list = glob.glob(search_path)
file_list += [os.path.basename(x) for x in filepath_list]

package_files = [rpath(pjoin(root, f), MODULE_PATH) for root, _, files in
                 os.walk(Qt5_PATH) for f in files]

package_files += [rpath(pjoin(root, f), MODULE_PATH) for root, _, files in
                  os.walk(UIC_PATH) for f in files]

packages = find_packages()
setup(
    name='PyQt5',
    version='5.6.1',
    license='GPLv3',
    url='https://www.riverbankcomputing.com/software/pyqt/download5',
    description='PyQt5',
    classifiers=[
        'Programming Language :: C',
        'Programming Language :: Python',
Example #8
0
os_system = platform.system()
if os_system == 'Darwin':
    mauve_make = 'build_osx.sh'
elif os_system == 'Linux':      # update this for BSD, other POSIX etc
    mauve_make = 'build_linux.sh'
else:
    raise OSError("Platform %s not supported" % (os_system))

print("Building mauve dependencies...")
mauve_make = pjoin(SRC_PATH, mauve_make)
mauvebuild = subprocess.Popen([mauve_make], shell=True, cwd=SRC_PATH)
mauvebuild.wait()
print("Finished building mauve dependencies")

# Find all mauve data files to include with the package
mauve_files = [rpath(pjoin(root, f), MODULE_PATH) for root, _, files in
                    os.walk(BIN_PATH) for f in files]
mauve_files += [rpath(pjoin(root, f), MODULE_PATH) for root, _, files in
                    os.walk(INCLUDE_PATH) for f in files]


DESCRIPTION = ("Python wrapper for progressive mauve genome aligner")

DISTNAME = 'mauve-py'
LICENSE = 'GPLv2'
AUTHORS = "Nick Conway, Ben Pruitt"
EMAIL = "*****@*****.**"
URL = ""
DOWNLOAD_URL = ''
CLASSIFIERS = [
    'Development Status :: 1 - Beta',
Example #9
0
MAKE_BIN = 'mingw32-make' if sys.platform == 'win32' else 'make'
# Indicates whether the Primer3 library has been built during install
P3_BUILT = False

# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Package paths ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ #

PACKAGE_PATH = os.path.abspath(os.path.dirname(__file__))
MODULE_PATH = pjoin(PACKAGE_PATH, 'primer3')
SRC_PATH = pjoin(MODULE_PATH, 'src')
TESTS_PATH = pjoin(MODULE_PATH, 'tests')
LIBPRIMER3_PATH = pjoin(SRC_PATH, 'libprimer3')
THERMO_PARAMS_PATH = pjoin(LIBPRIMER3_PATH, 'primer3_config')
KLIB_PATH = pjoin(LIBPRIMER3_PATH, 'klib')

LIBPRIMER3_FPS = [
    rpath(pjoin(LIBPRIMER3_PATH, 'thal.c')),
    rpath(pjoin(LIBPRIMER3_PATH, 'oligotm.c')),
    rpath(pjoin(LIBPRIMER3_PATH, 'p3_seq_lib.c')),
    rpath(pjoin(LIBPRIMER3_PATH, 'libprimer3.c')),
    rpath(pjoin(LIBPRIMER3_PATH, 'dpal.c')),
    rpath(pjoin(SRC_PATH, 'primerdesign_helpers.c')),
]

LIBPRIMER3_BINARIES = ['oligotm', 'ntthal', 'primer3_core']
if sys.platform == 'win32':
    LIBPRIMER3_BINARIES = [bin_fn + '.exe' for bin_fn in LIBPRIMER3_BINARIES]

LIBPRIMER3_BINARY_FPS = [
    pjoin(LIBPRIMER3_PATH, fn) for fn in LIBPRIMER3_BINARIES
]
Example #10
0
''' % (version)

LONG_DESCRIPTION = __doc__

PACKAGE_PATH = os.path.abspath(os.path.dirname(__file__))
MODULE_PATH = pjoin(PACKAGE_PATH, 'cadnano')
INSTALL_EXE_PATH = pjoin(MODULE_PATH, 'extras', 'install_exe')
TESTS_PATH = pjoin(MODULE_PATH, 'tests')
TEST_DATA_PATH = pjoin(TESTS_PATH, 'data')
IMAGES_PATH1 = pjoin(MODULE_PATH, 'gui', 'mainwindow', 'images')
IMAGES_PATH2 = pjoin(MODULE_PATH, 'gui', 'dialogs', 'images')

# batch files and launch scripts

test_files = [
    rpath(pjoin(root, f), MODULE_PATH)
    for root, _, files in os.walk(TESTS_PATH) for f in files
]
test_data_files = [
    rpath(pjoin(root, f), MODULE_PATH)
    for root, _, files in os.walk(TEST_DATA_PATH) for f in files
]
cn_files = [
    rpath(pjoin(root, f), MODULE_PATH)
    for root, _, files in os.walk(IMAGES_PATH1) for f in files
]
cn_files += [
    rpath(pjoin(root, f), MODULE_PATH)
    for root, _, files in os.walk(IMAGES_PATH2) for f in files
]
cn_files += test_files + test_data_files
Example #11
0
from os import remove as rem  # imports  os.remove() and names it "rem"

from time import sleep as t  # imports time.sleep() and names it "t"

from os.path import dirname as fpath  # imports os.path.dirname() and names it "fpath"

from os.path import realpath as rpath  # imports os.path.realpath() and names it "rpath"

from sys import exit as quit  # imports sys.exit() and names it "quit"

# this is used to find the directory this file is in, it is later used
# to move the other files to "/release/file.pyc," I just hadn't wanted
# clutter in the building directory. (These notes are for the
# "path = fpath(rpath(__file__))" bit below this note, I know it's  bit lengthy)
path = fpath(rpath(__file__))

# these make a .pyc version of all these files
pyc("Read.py")
pyc("Settings.py")
pyc("Socket.py")
pyc("Commands.py")
pyc("Run.py")
pyc("Threads.py")

try:  # if the file does not exist, it will bring up an error
    # these remove the current file because on windows,
    # moving a file to another file's directory even if they
    # are the same file, brings up an error.
    rem(path + "/release/Read.pyc")
    rem(path + "/release/Settings.pyc")
Example #12
0
if os_system == 'Darwin':
    mauve_make = 'build_osx.sh'
elif os_system == 'Linux':  # update this for BSD, other POSIX etc
    mauve_make = 'build_linux.sh'
else:
    raise OSError("Platform %s not supported" % (os_system))

print("Building mauve dependencies...")
mauve_make = pjoin(SRC_PATH, mauve_make)
mauvebuild = subprocess.Popen([mauve_make], shell=True, cwd=SRC_PATH)
mauvebuild.wait()
print("Finished building mauve dependencies")

# Find all mauve data files to include with the package
mauve_files = [
    rpath(pjoin(root, f), MODULE_PATH) for root, _, files in os.walk(BIN_PATH)
    for f in files
]
mauve_files += [
    rpath(pjoin(root, f), MODULE_PATH)
    for root, _, files in os.walk(INCLUDE_PATH) for f in files
]

DESCRIPTION = ("Python wrapper for progressive mauve genome aligner")

DISTNAME = 'mauve-py'
LICENSE = 'GPLv2'
AUTHORS = "Nick Conway, Ben Pruitt"
EMAIL = "*****@*****.**"
URL = ""
DOWNLOAD_URL = ''