-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
corrections to setup.py to prevent mark down from causing build issues
- Loading branch information
Michele Fabbri
committed
Oct 17, 2022
1 parent
b983e4f
commit edd1e28
Showing
3 changed files
with
43 additions
and
63 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,53 +1,40 @@ | ||
from setuptools import setup, find_packages | ||
import sys | ||
from pathlib import Path | ||
|
||
CURRENT_DIRECTORY = Path(__file__).parent.absolute() | ||
REQUIRED_PYTHON = (3, 8) | ||
CURRENT_PYTHON = sys.version_info[:2] | ||
VER_ERR_MSG = """ | ||
========================== | ||
Unsupported Python version | ||
========================== | ||
Python {}.{} was found, but this version of iblrig requires Python {}.{}. | ||
""" | ||
if CURRENT_PYTHON != REQUIRED_PYTHON: | ||
sys.stderr.write(VER_ERR_MSG.format(*REQUIRED_PYTHON + CURRENT_PYTHON)) | ||
sys.exit(1) | ||
|
||
with open("README.md", "r") as f: | ||
long_description = f.read() | ||
|
||
with open("requirements.txt") as f: | ||
require = [x.strip() for x in f.readlines()] | ||
|
||
|
||
def read(rel_path): | ||
here = Path(__file__).parent.absolute() | ||
with open(here.joinpath(rel_path), "r") as fp: | ||
return fp.read() | ||
|
||
|
||
def get_version(rel_path): | ||
for line in read(rel_path).splitlines(): | ||
if line.startswith("__version__"): | ||
delim = '"' if '"' in line else "'" | ||
return line.split(delim)[1] | ||
else: | ||
raise RuntimeError("Unable to find version string.") | ||
|
||
|
||
setup( | ||
name="iblrig", | ||
version=get_version(Path("iblrig").joinpath("__init__.py")), | ||
python_requires=">={}.{}".format(*REQUIRED_PYTHON), | ||
description="IBL libraries", | ||
license="MIT", | ||
long_description=long_description, | ||
author="IBL Staff", | ||
url="https://www.internationalbrainlab.com/", | ||
packages=find_packages(exclude=["scratch"]), # same as name | ||
# external packages as dependencies | ||
install_requires=require, | ||
scripts=[], | ||
) | ||
from pathlib import Path | ||
|
||
from setuptools import setup, find_packages | ||
|
||
PYTHON_REQUIRES = "==3.8.*" # python version requirement | ||
LONG_DESCRIPTION = "Software used to interact with various pieces of specialized hardware for neuroscience data acquisition." | ||
|
||
with open("requirements.txt") as f: | ||
require = [x.strip() for x in f.readlines()] | ||
|
||
|
||
def read(rel_path): | ||
here = Path(__file__).parent.absolute() | ||
with open(here.joinpath(rel_path), "r") as fp: | ||
return fp.read() | ||
|
||
|
||
def get_version(rel_path): | ||
for line in read(rel_path).splitlines(): | ||
if line.startswith("__version__"): | ||
delim = '"' if '"' in line else "'" | ||
return line.split(delim)[1] | ||
else: | ||
raise RuntimeError("Unable to find version string.") | ||
|
||
|
||
setup( | ||
name="iblrig", | ||
version=get_version(Path("iblrig").joinpath("__init__.py")), | ||
python_requires=PYTHON_REQUIRES, | ||
description="IBL libraries", | ||
license="MIT", | ||
long_description=LONG_DESCRIPTION, | ||
author="IBL Staff", | ||
url="https://www.internationalbrainlab.com/", | ||
packages=find_packages(exclude=["scratch"]), # same as name | ||
# external packages as dependencies | ||
install_requires=require, | ||
scripts=[], | ||
) |