Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a setup.py #120

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
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
46 changes: 46 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
#!/usr/bin/env python

from distutils.core import setup
from pathlib import Path
from setuptools import find_packages


def read_version() -> str:
"""
This script reads the information inside AugmentedNet/__init__.py without
importing the package, which is not allowed inside the setup.py file
"""
version = None

with open(
Path(__file__).parent / "AugmentedNet" / "__init__.py", "r"
) as f:
lines = f.readlines()

for line in lines:
if line.startswith("__version__"):
version = line.split('"')[1]
if version is None:
raise RuntimeError(
"Can't read package version from file AugmentedNet/__init__.py"
)
return version


setup(
name="AugmentedNet",
version=read_version(),
description="A Roman Numeral Analysis Network with Synthetic Training Examples and Additional Tonal Tasks",
author="Néstor Nápoles López",
author_email="[email protected]",
url="https://github.com/napulen/AugmentedNet/",
python_requires=">=3.7",
install_requires=[
"music21>=6.7,<7",
"numpy>=1.19,<2",
"pandas>=1.4,<2",
"tensorflow>=2.5,<3",
"mlflow>=1.23<2",
],
packages=find_packages(),
)