Skip to content
Snippets Groups Projects
Commit 674b8c7c authored by van den Berg's avatar van den Berg
Browse files

Fix packaging

parent c6f39403
No related branches found
No related tags found
No related merge requests found
Pipeline #2944 failed
include vtools/*.pyx
\ No newline at end of file
[metadata]
license_file=LICENSE
......@@ -7,69 +7,35 @@ setup.py
:license: MIT
"""
from os.path import abspath, dirname, join
import sys
import pkg_resources
import subprocess
from setuptools import setup, find_packages
# Temporarily install dependencies required by setup.py before trying to
# import them. From https://bitbucket.org/dholth/setup-requires
sys.path[0:0] = ['setup-requires']
pkg_resources.working_set.add_entry('setup-requires')
def missing_requirements(specifiers):
for specifier in specifiers:
try:
pkg_resources.require(specifier)
except pkg_resources.DistributionNotFound:
yield specifier
def install_requirements(specifiers):
to_install = list(specifiers)
if to_install:
cmd = [sys.executable, "-m", "pip", "install",
"-t", "setup-requires"] + to_install
subprocess.call(cmd)
requires = ['cython', 'numpy']
install_requirements(missing_requirements(requires))
from Cython.Build import cythonize
import numpy as np
from setuptools import setup, find_packages, Extension
readme_file = join(abspath(dirname(__file__)), "README.md")
with open(readme_file) as desc_handle:
long_desc = desc_handle.read()
# create extensions and add numpy includes to all of them.
cython_extensions = cythonize("vtools/*.pyx")
for ext in cython_extensions:
ext.include_dirs.append(np.get_include())
setup(
name="v-tools",
version="1.0.0",
version="1.0.0-dev",
description="Various tools operating over VCF files",
long_description=long_desc,
author="Sander Bollen",
author_email="a.h.b.bollen@lumc.nl",
url="https://git.lumc.nl/klinische-genetica/capture-lumc/vtools",
license="MIT",
packages=find_packages(),
package_dir={"": "src"},
packages=find_packages("src"),
package_data={
'vtools': ['vtools/*.pyx']
},
python_requires=">=3.6",
zip_safe=False,
include_package_data=True,
setup_requires=["cython"],
install_requires=[
"click",
"cyvcf2",
"numpy",
"cython",
"tqdm"
],
entry_points={
......@@ -87,5 +53,5 @@ setup(
"Programming Language :: Python :: 3.7",
"Topic :: Scientific/Engineering :: Bio-Informatics"
],
ext_modules=cython_extensions
ext_modules=[Extension("vtools.optimized", ["src/vtools/optimized.pyx"])]
)
File moved
File moved
File moved
File moved
File moved
File moved
"""
vtools
~~~~~~
:copyright: (c) 2018 Sander Bollen
:copyright: (c) 2018 Leiden University Medical Center
:license: MIT
"""
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment