Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion pymutspec/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from pymutspec import annotation, draw, io, constants, utils

# Define the pymutspec version
__version__ = "0.0.11"
__version__ = "0.0.12"
30 changes: 26 additions & 4 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,17 +1,39 @@
[build-system]
requires = ["setuptools", "wheel"]
build-backend = "setuptools.build_meta"

[project]
name = "PyMutSpec"
version = "0.0.11"
version = "0.0.12"
description = "Mutational spectra analysis package"
authors = [
{ name="kpotoh", email="axepon@mail.ru" },
]
description = "Mutational spectra analysis package"
license = { file = "LICENSE" }
readme = "README.md"
readme = {file = "README.md", content-type = "text/markdown"}
requires-python = ">=3.8"
classifiers = [
"Operating System :: OS Independent",
"Development Status :: 3 - Alpha",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Topic :: Scientific/Engineering",
"Topic :: Scientific/Engineering :: Bio-Informatics",
"Topic :: Software Development :: Libraries :: Python Modules",
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
]
dependencies = [
"numpy~=1.22.2",
"pandas~=1.4.0",
"seaborn==0.12.2",
"biopython==1.79",
"ete3==3.1.2",
"tqdm~=4.62.3",
"PyYAML~=6.0",
"pytest~=7.1.2",
"click~=8.1.3",
]

[project.urls]
Expand Down
File renamed without changes.
63 changes: 63 additions & 0 deletions scripts/legacy/setup.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
import os
import re
from setuptools import setup, find_packages

path_to_pyproject = 'pyproject.toml'


def read_specs(path: str):
specs = dict()
with open(path, 'r') as fin:
for line in fin:
if line.startswith('name'):
specs['name'] = re.match('name = "(.+)"', line).group(1)
elif line.startswith('version'):
specs['version'] = re.match('version = "(.+)"', line).group(1)
elif line.startswith('description'):
specs['description'] = re.match('description = "(.+)"', line).group(1)
elif line.startswith('requires-python'):
specs['python_requires'] = re.match('requires-python = "(.+)"', line).group(1)
break
return specs


def read_requirements(path: str):
with open(path, encoding="utf-8") as file:
requirements = []
extra_index_urls = []
for line in file:
line = line.strip()
if line:
if line.startswith('-f'):
extra_index_urls.append(line.split()[1])
elif line.startswith('#'):
continue
else:
requirements.append(line)
return requirements, extra_index_urls


requirements, _ = read_requirements("requirements.txt")

scripts = []
if os.path.exists("scripts"):
for file in os.listdir("scripts"):
if file.endswith(".py") and not file.startswith("_"):
fp = os.path.join("scripts", file)
with open(fp) as fin:
if "python" in fin.readline():
scripts.append(fp)

specs = read_specs(path_to_pyproject)

setup(
author="kpotoh",
author_email="axepon@mail.ru",
url="https://github.com/mitoclub/PyMutSpec",
license="MIT",
install_requires=requirements,
scripts=scripts,
packages=find_packages(),
package_data={'pymutspec': ['utils/configs/log_settings.yaml']},
**specs
)
48 changes: 2 additions & 46 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,59 +1,15 @@
import os
import re
from setuptools import setup, find_packages

path_to_pyproject = 'pyproject.toml'


def read_specs(path: str):
specs = dict()
with open(path, 'r') as fin:
for line in fin:
if line.startswith('name'):
specs['name'] = re.match('name = "(.+)"', line).group(1)
elif line.startswith('version'):
specs['version'] = re.match('version = "(.+)"', line).group(1)
elif line.startswith('description'):
specs['description'] = re.match('description = "(.+)"', line).group(1)
elif line.startswith('requires-python'):
specs['python_requires'] = re.match('requires-python = "(.+)"', line).group(1)
break
return specs


extra_index_urls = []
packages = []
scripts = []

with open("requirements.txt", encoding="utf-8") as file:
for line in map(str.strip, file):
if line:
if line.startswith("-f"):
extra_index_urls.append(line.split()[1])
elif line.startswith("#"):
continue
else:
packages.append(line)

if os.path.exists("scripts"):
for file in os.listdir("scripts"):
if file.endswith(".py") and not file.startswith("_"):
fp = os.path.join("scripts", file)
with open(fp) as fin:
if "python" in fin.readline():
scripts.append(fp)

specs = read_specs(path_to_pyproject)
scripts.append(fp)

setup(
author="kpotoh",
author_email="axepon@mail.ru",
url="https://github.com/mitoclub/PyMutSpec",
license="MIT",
install_requires=packages,
dependency_links=extra_index_urls,
scripts=scripts,
packages=find_packages(),
scripts=scripts,
package_data={'pymutspec': ['utils/configs/log_settings.yaml']},
**specs
)
Loading