Skip to content
Snippets Groups Projects
Commit 90360489 authored by Blaise Li's avatar Blaise Li
Browse files

Python version constraint.

parent 0a16ef10
No related branches found
No related tags found
No related merge requests found
# Compiled python modules.
*.pyc
# Setuptools distribution folder.
/dist/
# Python egg metadata, regenerated from source files by setuptools.
/*.egg-info
# Backups
*~
...@@ -19,6 +19,9 @@ subgroups of those reads based on similarity. ...@@ -19,6 +19,9 @@ subgroups of those reads based on similarity.
""" """
import sys import sys
major, minor = sys.version_info[:2]
if major < 3 or (major == 3 and minor < 8):
sys.exit("Need at least python 3.8\n")
import logging import logging
from pathlib import Path from pathlib import Path
import multiprocessing as mp import multiprocessing as mp
...@@ -59,6 +62,7 @@ def main(): ...@@ -59,6 +62,7 @@ def main():
pool.apply_async( pool.apply_async(
split_fasta, args=( split_fasta, args=(
in_fname, in_fname,
# "Walrus" assignment expression introduced in Python 3.8
cell_id := in_fname.name[:-len("_merged.fasta")], cell_id := in_fname.name[:-len("_merged.fasta")],
out_dir.join_path(cell_id))) out_dir.join_path(cell_id)))
for in_fname in in_fnames] for in_fname in in_fnames]
......
...@@ -39,7 +39,9 @@ setup( ...@@ -39,7 +39,9 @@ setup(
author="Blaise Li", author="Blaise Li",
author_email="blaise.li@normalesup.org", author_email="blaise.li@normalesup.org",
license="GNU GPLv3", license="GNU GPLv3",
python_requires=">=3.4, <4", # >=3.8 because using := in bin/split_merged.py
# Requirement could be relaxed to >=3.6 otherwise.
python_requires=">=3.8, <4",
packages=find_packages(), packages=find_packages(),
scripts=["bin/split_merged.py"], scripts=["bin/split_merged.py"],
#ext_modules = extensions, #ext_modules = extensions,
......
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