Skip to content

Commit

Permalink
Move chplcheck into its own directory in tools and have both proj…
Browse files Browse the repository at this point in the history
…ects use an `src` folder (chapel-lang#23817)

The new structure is as follows:

```
chapel-py
├── README.md
├── examples
│   ├── gather_unstable.py
│   └── replace.py
├── setup.py
└── src
    ├── chapel
    │   ├── __init__.py
    │   └── replace
    │       └── __init__.py
    ├── chapel.cpp
    └── method-tables.h

chplcheck
├── chplcheck
└── src
    ├── chplcheck.py
    ├── driver.py
    ├── lsp.py
    └── rules.py
```

This way, we have two advantages:

1. `chplcheck`, being a separate project, is in its own folder, can have
its own README and top-level files.
2. Because of `src`, we can have a `chplcheck` file in the root
directory, even if eventually we do write `chplcheck` as a module.

Reviewed by @jabraham17 -- thanks!
  • Loading branch information
DanilaFe authored Nov 9, 2023
2 parents 5c6d452 + 5c887aa commit d4b8fb3
Show file tree
Hide file tree
Showing 10 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion tools/chapel-py/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@

setup(name = "chapel",
version = "0.1",
package_dir = {'': 'src'},
packages = ['chapel', 'chapel.replace'],
ext_modules = [Extension("chapel.core", ["chapel.cpp"], extra_compile_args = CXXFLAGS, extra_link_args=LDFLAGS)]
ext_modules = [Extension("chapel.core", ["src/chapel.cpp"], extra_compile_args = CXXFLAGS, extra_link_args=LDFLAGS)]
)
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion tools/chapel-py/runChplcheck → tools/chplcheck/chplcheck
Original file line number Diff line number Diff line change
Expand Up @@ -26,5 +26,5 @@ if [ -z "$CHPL_HOME" ]; then
fi

exec $CHPL_HOME/util/config/run-in-venv-with-python-bindings.bash \
$CHPL_HOME/tools/chapel-py/chplcheck/__init__.py "$@"
$CHPL_HOME/tools/chplcheck/src/chplcheck.py "$@"

File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit d4b8fb3

Please sign in to comment.