Skip to content

Commit 00942bd

Browse files
committed
add reqs, fix setup
1 parent d23d167 commit 00942bd

File tree

2 files changed

+86
-0
lines changed

2 files changed

+86
-0
lines changed

requirements.txt

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
pymc>=4.0.0b1

setup.py

+85
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,85 @@
1+
# Copyright 2022 The PyMC Developers
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
15+
import re
16+
17+
from codecs import open
18+
from os.path import dirname, join, realpath
19+
20+
from setuptools import find_packages, setup
21+
22+
DISTNAME = "pymc_experimental"
23+
DESCRIPTION = "A home for new additions to PyMC, which may include unusual probability distribitions, advanced model fitting algorithms, or any code that may be inappropriate to include in the pymc repository, but may want to be made available to users."
24+
AUTHOR = "PyMC Developers"
25+
AUTHOR_EMAIL = "[email protected]"
26+
URL = "http://github.com/pymc-devs/pymc-experimental"
27+
LICENSE = "Apache License, Version 2.0"
28+
29+
classifiers = [
30+
"Development Status :: 5 - Production/Stable",
31+
"Programming Language :: Python",
32+
"Programming Language :: Python :: 3",
33+
"Programming Language :: Python :: 3.7",
34+
"Programming Language :: Python :: 3.8",
35+
"Programming Language :: Python :: 3.9",
36+
"License :: OSI Approved :: Apache Software License",
37+
"Intended Audience :: Science/Research",
38+
"Topic :: Scientific/Engineering",
39+
"Topic :: Scientific/Engineering :: Mathematics",
40+
"Operating System :: OS Independent",
41+
]
42+
43+
PROJECT_ROOT = dirname(realpath(__file__))
44+
45+
# Get the long description from the README file
46+
with open(join(PROJECT_ROOT, "README.md"), encoding="utf-8") as buff:
47+
LONG_DESCRIPTION = buff.read()
48+
49+
REQUIREMENTS_FILE = join(PROJECT_ROOT, "requirements.txt")
50+
51+
with open(REQUIREMENTS_FILE) as f:
52+
install_reqs = f.read().splitlines()
53+
54+
55+
def get_version():
56+
VERSIONFILE = join("pymc_experimental", "__init__.py")
57+
lines = open(VERSIONFILE).readlines()
58+
version_regex = r"^__version__ = ['\"]([^'\"]*)['\"]"
59+
for line in lines:
60+
mo = re.search(version_regex, line, re.M)
61+
if mo:
62+
return mo.group(1)
63+
raise RuntimeError(f"Unable to find version in {VERSIONFILE}.")
64+
65+
66+
if __name__ == "__main__":
67+
setup(
68+
name=DISTNAME,
69+
version=get_version(),
70+
maintainer=AUTHOR,
71+
maintainer_email=AUTHOR_EMAIL,
72+
description=DESCRIPTION,
73+
license=LICENSE,
74+
url=URL,
75+
long_description=LONG_DESCRIPTION,
76+
long_description_content_type="text/x-rst",
77+
packages=find_packages(),
78+
# because of an upload-size limit by PyPI, we're temporarily removing docs from the tarball.
79+
# Also see MANIFEST.in
80+
# package_data={'docs': ['*']},
81+
include_package_data=True,
82+
classifiers=classifiers,
83+
python_requires=">=3.7",
84+
install_requires=install_reqs,
85+
)

0 commit comments

Comments
 (0)