Skip to content

Commit

Permalink
Distribute examples as part of ert3
Browse files Browse the repository at this point in the history
  • Loading branch information
kvashchuka committed Mar 18, 2021
1 parent 89a674e commit 8811193
Show file tree
Hide file tree
Showing 40 changed files with 7 additions and 6 deletions.
3 changes: 3 additions & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
include ert3/examples/*
include ert_gui/resources/*
include ert_logging/*
4 changes: 2 additions & 2 deletions ert3/console/_console.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

def _build_init_argparser(subparsers):
init_parser = subparsers.add_parser("init", help="Initialize an ERT3 workspace")
pkg_examples_path = pathlib.Path(pkg.resource_filename("ert", "../examples"))
pkg_examples_path = pathlib.Path(pkg.resource_filename("ert3", "examples"))
ert_example_names = []
for example in pkg_examples_path.iterdir():
if example.is_dir() and "__" not in example.name:
Expand Down Expand Up @@ -103,7 +103,7 @@ def _init(args):
ert3.workspace.initialize(pathlib.Path.cwd())
else:
example_name = args.example
pkg_examples_path = pathlib.Path(pkg.resource_filename("ert", "../examples"))
pkg_examples_path = pathlib.Path(pkg.resource_filename("ert3", "examples"))
pkg_example_path = pkg_examples_path / example_name
wd_example_path = pathlib.Path.cwd() / example_name
# check that examples folder exist
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Empty file.
2 changes: 2 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[build-system]
requires = ["setuptools", "wheel", "setuptools_scm"]
4 changes: 0 additions & 4 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,6 @@ def package_files(directory):
return paths


extra_files = package_files("ert_gui/resources/")
logging_configuration = package_files("ert_logging/")

setup(
name="ert",
author="Equinor ASA",
Expand All @@ -25,7 +22,6 @@ def package_files(directory):
"console_scripts": "ert3=ert3.console:main",
},
packages=find_packages(exclude=["tests*"]),
package_data={"ert_gui": extra_files, "ert_logging": logging_configuration},
include_package_data=True,
license="Open Source",
long_description=open("README.md").read(),
Expand Down

0 comments on commit 8811193

Please sign in to comment.