Skip to content

Commit

Permalink
corrections to setup.py to prevent mark down from causing build issues
Browse files Browse the repository at this point in the history
  • Loading branch information
Michele Fabbri committed Oct 17, 2022
1 parent b983e4f commit edd1e28
Show file tree
Hide file tree
Showing 3 changed files with 43 additions and 63 deletions.
11 changes: 1 addition & 10 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,16 +60,7 @@ jobs:
conda env list
python --version
echo "------ end info ------"
python -m unittest test_iblrig/test_adaptive.py
python -m unittest test_iblrig/test_alyx.py
python -m unittest test_iblrig/test_ibllib_imports.py
python -m unittest test_iblrig/test_params.py
python -m unittest test_iblrig/test_path_helper.py
python -m unittest test_iblrig/test_pybpod_config.py
python -m unittest test_iblrig/test_scripts.py
python -m unittest test_iblrig/test_start_pybpod.py
python -m unittest test_iblrig/test_task.py
# python -m unittest discover
python -m unittest discover
- name: Generate requirements_frozen.txt
shell: pwsh -l {0}
Expand Down
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
# iblrig v7
Software used to interact with various pieces of specialized hardware for neuroscience data acquisition.

## Installation on Windows
Software has only been tested on Windows 10. No other version of Windows is supported at this time. The test user account has
administrative rights.
Expand Down
93 changes: 40 additions & 53 deletions setup.py
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=[],
)

0 comments on commit edd1e28

Please sign in to comment.