-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added setup.py, updated gitignore. Fixed deprecation in config.
- Loading branch information
Showing
4 changed files
with
51 additions
and
3 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,7 @@ | ||
doc/build | ||
doc/static | ||
.idea | ||
.idea | ||
.pytest_cache | ||
build | ||
dist | ||
src/random_events.egg-info |
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 |
---|---|---|
@@ -0,0 +1,44 @@ | ||
from setuptools import setup | ||
import os | ||
import codecs | ||
|
||
long_description = """Probabilistic Machine Learning frequently requires descriptions of random variables and events | ||
that are shared among many packages.This package provides a common interface for describing random variables and events, | ||
providing usable and easily extensible classes.""" | ||
|
||
|
||
def read(rel_path): | ||
here = os.path.abspath(os.path.dirname(__file__)) | ||
with codecs.open(os.path.join(here, 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.") | ||
|
||
|
||
def requirements(): | ||
with open('requirements.txt', 'r') as f: | ||
return [_.strip() for _ in f.readlines() if _.strip()] | ||
|
||
|
||
setup(name='random_events', | ||
version=get_version(os.path.join("src", "random_events", "__init__.py")), | ||
description='Define random events for probabilistic reasoning', | ||
long_description=long_description, | ||
long_description_content_type='text/plain', | ||
author='Tom Schierenbeck', | ||
author_email='[email protected]', | ||
url='https://github.com/tomsch420/random-events', | ||
packages=['random_events'], | ||
install_requires=['setuptools'] + requirements(), | ||
keywords='random events probabilistic machine learning probability theory variables', | ||
project_urls={'Source': 'https://github.com/tomsch420/random-events', | ||
'Documentation': 'TODO'}, | ||
python_requires='>=3.6', | ||
package_dir={'': 'src'},) |
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 |
---|---|---|
@@ -0,0 +1 @@ | ||
__version__ = '1.0.0' |
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