-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
5aa7943
commit 0619f09
Showing
4 changed files
with
37 additions
and
62 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 was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
|
@@ -2,72 +2,71 @@ | |
# -*- coding: utf-8 -*- | ||
|
||
"""The setup script.""" | ||
from glob import glob | ||
import os | ||
from os.path import basename | ||
from os.path import splitext | ||
|
||
from setuptools import setup, find_packages | ||
from sphinx.setup_command import BuildDoc | ||
|
||
try: | ||
from sphinx.setup_command import BuildDoc | ||
|
||
cmdclass = {"build_sphinx": BuildDoc} | ||
except ImportError: | ||
# sphinx not installed - do not provide build_sphinx cmd | ||
cmdclass = {} | ||
|
||
|
||
with open("README.rst") as readme_file: | ||
readme = readme_file.read() | ||
|
||
with open("HISTORY.rst") as history_file: | ||
history = history_file.read() | ||
|
||
REQUIREMENTS = [ | ||
"libecl", | ||
"numpy", | ||
"pandas>0.23.0", | ||
"pyyaml>=5.1", | ||
"six>=1.12.0", | ||
] | ||
|
||
def relpath(*args): | ||
"""Return path of args relative to this file""" | ||
root = os.path.dirname(__file__) | ||
if isinstance(args, str): | ||
return os.path.join(root, args) | ||
return os.path.join(root, *args) | ||
|
||
|
||
def parse_requirements(filename): | ||
"""Load requirements from a pip requirements file""" | ||
try: | ||
lineiter = (line.strip() for line in open(filename)) | ||
return [line for line in lineiter if line and not line.startswith("#")] | ||
except IOError: | ||
return [] | ||
|
||
|
||
REQUIREMENTS = parse_requirements("requirements.txt") | ||
|
||
SETUP_REQUIREMENTS = ["pytest-runner", "setuptools>=28", "setuptools_scm"] | ||
SETUP_REQUIREMENTS = ["setuptools>=28", "setuptools_scm"] | ||
|
||
TEST_REQUIREMENTS = parse_requirements("requirements_dev.txt") | ||
TEST_REQUIREMENTS = [ | ||
"flake8>=2.6.0", | ||
"pylint", | ||
"pytest>=2.9.2", | ||
"pyyaml>=5.1", | ||
"sphinx>=1.4.8", | ||
"sphinx_rtd_theme>=0.4.1", | ||
] | ||
|
||
EXTRAS_REQUIRE = {"Parquet": ["pyarrow"]} | ||
EXTRAS_REQUIRE = {"tests": TEST_REQUIREMENTS, "parquet": ["pyarrow"]} | ||
|
||
setup( | ||
name="fmu-ensemble", | ||
use_scm_version={"write_to": "src/fmu/ensemble/version.py"}, | ||
cmdclass={"build_sphinx": BuildDoc}, | ||
cmdclass=cmdclass, | ||
description="Python API to ensembles produced by ERT", | ||
long_description=readme + "\n\n" + history, | ||
author="Håvard Berland", | ||
author_email="[email protected]", | ||
url="https://git.equinor.com/equinor/fmu-ensemble", | ||
url="https://github.com/equinor/fmu-ensemble", | ||
license="GPLv3", | ||
packages=find_packages("src"), | ||
package_dir={"": "src"}, | ||
py_modules=[splitext(basename(path))[0] for path in glob("src/*.py")], | ||
include_package_data=True, | ||
install_requires=REQUIREMENTS, | ||
zip_safe=False, | ||
keywords="fmu, ensemble", | ||
classifiers=[ | ||
"Development Status :: 2 - Pre-Alpha", | ||
"Development Status :: 5 - Production/Stable", | ||
"Intended Audience :: Developers", | ||
"Natural Language :: English", | ||
"Programming Language :: Python :: 2", | ||
"Programming Language :: Python :: 2.7", | ||
"Programming Language :: Python :: 3", | ||
"Programming Language :: Python :: 3.4", | ||
"Programming Language :: Python :: 3.6", | ||
"Programming Language :: Python :: 3.7", | ||
"Programming Language :: Python :: 3.8", | ||
], | ||
test_suite="tests", | ||
tests_require=TEST_REQUIREMENTS, | ||
|