Skip to content

Commit

Permalink
Create new chplspell-venv Makefile rules, and update documentation
Browse files Browse the repository at this point in the history
chplspell-venv is based on (copied directly from) the test-venv and
chpldoc-venv.  Except those are user-facing venvs, and chplspell-venv
is developer-only.  So it's set up and described in .devel versions of
the Makefiles and READMEs, where appropriate.

chplspell-requirements.txt drives the venv creation.

Update the LICENSE and third-party/chpl-venv/README.devel.md with
licensing information about the scspell program installed into the
chplspell-venv.

Update gen_release to remove the new developer-only files.
  • Loading branch information
cassella committed Dec 15, 2016
1 parent 5d84734 commit af55d75
Show file tree
Hide file tree
Showing 9 changed files with 83 additions and 2 deletions.
9 changes: 8 additions & 1 deletion LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,12 @@ The Chapel implementation is composed of two categories of code:
Python
BSD
GPL 3
scspell Spell-checking utility (developer-only) GPL 2
scspell SCOWL word lists
Spell-checking dictionaries (developer-only) MIT-like
BSD
other (UKACD)
public domain

gasnet portable communication library BSD-like
gmp optional multi-precision math library L-GPL
Expand Down Expand Up @@ -70,7 +76,8 @@ The Chapel implementation is composed of two categories of code:
vim only used if a user modifies their vim environment

third-party/
chpl-venv only used when running 'chpldoc' or 'start_test'
chpl-venv only used when running 'chpldoc', 'start_test',
or the developer-only 'chplspell'
gasnet only used when CHPL_COMM is 'gasnet'
gmp only used when CHPL_GMP is 'gmp'
hwloc only used when CHPL_HWLOC is 'hwloc'
Expand Down
11 changes: 11 additions & 0 deletions Makefile.devel
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ PYTHON_VERSION_DIR = py$(shell $(CHPL_MAKE_HOME)/util/chplenv/chpl_python_versio

develall: STATUS
@$(MAKE) always-build-man
@$(MAKE) always-build-chplspell-venv

docs: chpldoc
cd doc && $(MAKE) docs
Expand All @@ -42,6 +43,16 @@ always-build-man: FORCE
$(MAKE) man; \
fi

third-party-chplspell-venv: FORCE
cd third-party && $(MAKE) chplspell-venv

chplspell-venv: third-party-chplspell-venv

always-build-chplspell-venv: FORCE
-@if [ -n "$$CHPL_ALWAYS_BUILD_CHPLSPELL_VENV" ]; then \
$(MAKE) chplspell-venv; \
fi

spec: FORCE
cd spec && $(MAKE)

Expand Down
4 changes: 4 additions & 0 deletions third-party/Makefile.devel
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,7 @@ openmpi: FORCE
pvm: FORCE
cd pvm && $(MAKE)

chplspell-venv: $(CHPL_VENV_CHPLSPELL_REQS)
$(CHPL_VENV_CHPLSPELL_REQS): $(CHPL_VENV_CHPLSPELL_REQUIREMENTS_FILE)
cd chpl-venv && $(MAKE) chplspell-venv

13 changes: 13 additions & 0 deletions third-party/README.devel
Original file line number Diff line number Diff line change
Expand Up @@ -38,3 +38,16 @@ the CWD is third-party/qthread/:

(Note that Qthreads is not perfect here since it's not really released
in "versions" currently. But as an example it's good enough.)



chpl-venv/
==========

README describes the use of the chpl-venv/ subdirectory to hold some
dependencies of chpldoc and the testing system. As for those end-user
tools, chpl-venv is used to hold dependencies of the chplspell
developer tool.

See chplspell-requirements for a complete list of packages that are
installed.
16 changes: 15 additions & 1 deletion third-party/chpl-venv/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -85,12 +85,22 @@ $(CHPL_VENV_SPHINX_BUILD): $(CHPL_VENV_VIRTUALENV_DIR)
-U --force-reinstall -r chpldoc-requirements.txt && \
$(CHPL_VENV_VIRTUALENV) --relocatable $(CHPL_VENV_VIRTUALENV_DIR)

$(CHPL_VENV_CHPLSPELL_REQS): $(CHPL_VENV_VIRTUALENV_DIR)
export PATH=$(CHPL_VENV_VIRTUALENV_BIN):$$PATH && \
export VIRTUAL_ENV=$(CHPL_VENV_VIRTUALENV_DIR) && \
python $(CHPL_VENV_VIRTUALENV_BIN)/pip install \
-U --force-reinstall -r chplspell-requirements.txt && \
$(CHPL_VENV_VIRTUALENV) --relocatable $(CHPL_VENV_VIRTUALENV_DIR) && \
touch $(CHPL_VENV_CHPLSPELL_REQS)

test-venv: $(CHPL_VENV_TEST_REQS)

chpldoc-venv: $(CHPL_VENV_SPHINX_BUILD)

chplspell-venv: $(CHPL_VENV_CHPLSPELL_REQS)

# Phony convenience target for install python packages.
install-requirements: rm-test-reqs rm-sphinx-build $(CHPL_VENV_TEST_REQS) $(CHPL_VENV_SPHINX_BUILD)
install-requirements: rm-test-reqs rm-sphinx-build $(CHPL_VENV_TEST_REQS) $(CHPL_VENV_SPHINX_BUILD) $(CHPL_VENV_CHPLSPELL_REQS)

# Remove chpl-test-reqs, forcing install-requirements to be rebuilt.
rm-test-reqs: FORCE
Expand All @@ -100,6 +110,10 @@ rm-test-reqs: FORCE
rm-sphinx-build: FORCE
@rm -f $(CHPL_VENV_SPHINX_BUILD)

# Remove chplspell-reqs, forcing install-requirements to be rebuilt.
rm-chplspell-reqs: FORCE
@rm -f $(CHPL_VENV_CHPLSPELL_REQS)

# Fix up the chpl-venv installation in a Cray Chapel module that was built using a non-standard
# Python installation (ie, the Python used was not installed under "/usr/...").
# Only applicable when building a Cray Chapel module under certain conditions.
Expand Down
2 changes: 2 additions & 0 deletions third-party/chpl-venv/Makefile.include
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ CHPL_VENV_DIR=$(shell cd $(THIRD_PARTY_DIR)/chpl-venv && pwd)

CHPL_VENV_TEST_REQUIREMENTS_FILE=$(CHPL_VENV_DIR)/test-requirements.txt
CHPL_VENV_CHPLDOC_REQUIREMENTS_FILE=$(CHPL_VENV_DIR)/chpldoc-requirements.txt
CHPL_VENV_CHPLSPELL_REQUIREMENTS_FILE=$(CHPL_VENV_DIR)/chplspell-requirements.txt

# Do not include this file from $(CHPL_MAKE_HOME)/make/Makefile.base.
# Makefile.base gets run by the chpl compiler, but the third-party/chpl-venv stuff
Expand All @@ -33,3 +34,4 @@ CHPL_VENV_VIRTUALENV_DIR=$(CHPL_VENV_DIR)/$(CHPL_VENV_VIRTUALENV_SUBDIR)
CHPL_VENV_VIRTUALENV_BIN=$(CHPL_VENV_VIRTUALENV_DIR)/bin
CHPL_VENV_SPHINX_BUILD=$(CHPL_VENV_VIRTUALENV_BIN)/sphinx-build
CHPL_VENV_TEST_REQS=$(CHPL_VENV_VIRTUALENV_DIR)/chpl-test-reqs
CHPL_VENV_CHPLSPELL_REQS=$(CHPL_VENV_VIRTUALENV_DIR)/chpl-chplspell-reqs
23 changes: 23 additions & 0 deletions third-party/chpl-venv/README.devel.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
chpl-venv devel files
=====================

As the Makefile installs end-user Python packages into the virutalenv
(described in [README.md](README.md)), the Makefile.devel installs
Python packages required by the developer tool `chplspell`.


The primary packages required by `chplspell` are: `scspell`,
`argparse`, and `virtualenv` (for installation). `argparse` and
`virtualenv` are described in [README.md](README.md) as they are also
required by end-user tools.


### scspell

A spell checker for source code

**program License**: GPL 2

**word list License**: public domain, assorted (See https://github.com/myint/scspell/blob/master/SCOWL-LICENSE.txt)

**Website**: https://pypi.python.org/pypi/scspell3k
2 changes: 2 additions & 0 deletions third-party/chpl-venv/chplspell-requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
argparse==1.3.0
scspell3k>=2
5 changes: 5 additions & 0 deletions util/buildRelease/gen_release
Original file line number Diff line number Diff line change
Expand Up @@ -198,6 +198,11 @@ SystemOrDie("cd runtime/include && rm -r sunos_old");

print "Removing third-party directories that are not intended for release...\n";
SystemOrDie("cd third-party && rm *.devel*");
SystemOrDie("cd third-party/chpl-venv && rm *.devel*");

print "Removing chplspell/scspell files not intended for release...\n";
SystemOrDie("cd third-party && rm chplspell-requirements.txt");
# Or include this as part of "third-party" pruning above?

print "Removing Git metadata files not intended for release...\n";
SystemOrDie('find . -type f \( -name .gitignore -o -name .gitattributes \) -exec rm -f {} \; -print');
Expand Down

0 comments on commit af55d75

Please sign in to comment.