Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
Pydgets
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
713
Mentat
Pydgets
Commits
cd1d4efc
Commit
cd1d4efc
authored
3 years ago
by
Rajmund Hruška
Browse files
Options
Downloads
Patches
Plain Diff
Improve Makefile
parent
189f298b
No related branches found
No related tags found
1 merge request
!1
CI/CD
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
Makefile
+149
-18
149 additions, 18 deletions
Makefile
Makefile-dep
+0
-44
0 additions, 44 deletions
Makefile-dep
requirements-dev.pip
+9
-0
9 additions, 0 deletions
requirements-dev.pip
with
158 additions
and
62 deletions
Makefile
+
149
−
18
View file @
cd1d4efc
#
# Minimal makefile for Sphinx documentation
#
DIR_LIB
=
pydgets
# You can set these variables from the command line.
SPHINXOPTS
=
SPHINXBUILD
=
sphinx-build
SPHINXPROJ
=
Pydgets-Python3ConsoleWidgetLibrary
SOURCEDIR
=
.
BUILDDIR
=
doc/_build
SPHINXSOURCEDIR
=
.
SPHINXBUILDDIR
=
doc/_build
PYTHON
=
python
PIP
=
pip
NOSETESTS
=
nosetests
TWINE
=
twine
#
# Color code definitions for colored terminal output
# https://stackoverflow.com/questions/5947742/how-to-change-the-output-color-of-echo-in-linux
#
RED
=
\0
33[0
;
31m
GREEN
=
\0
33[0
;
32m
ORANGE
=
\0
33[0
;
33m
BLUE
=
\0
33[0
;
34m
PURPLE
=
\0
33[0
;
35m
CYAN
=
\0
33[0
;
36m
NC
=
\0
33[0m
#-------------------------------------------------------------------------------
#
# Default make target, alias for 'help', you must explicitly choose the target.
#
default
:
docs-help
#
# Perform all reasonable tasks to do full build.
#
full
:
docs archive bdist deploy
#
# Perform local build.
#
build
:
archive bdist
#
# Perfom build from automated system.
#
buildbot
:
bdist
#
# Check the project code.
#
check
:
test
#-------------------------------------------------------------------------------
docs
:
docs-html
docs-help
:
FORCE
@$(
SPHINXBUILD
)
-M
help
"
$(
SPHINXSOURCEDIR
)
"
"
$(
SPHINXBUILDDIR
)
"
$(
SPHINXOPTS
)
$(
O
)
docs-html
:
FORCE
@
echo
"
\n
${
GREEN
}
*** Generating project documentation ***
${
NC
}
\n
"
@$(
SPHINXBUILD
)
-M
html
"
$(
SPHINXSOURCEDIR
)
"
"
$(
SPHINXBUILDDIR
)
"
$(
SPHINXOPTS
)
$(
O
)
#-------------------------------------------------------------------------------
show-version
:
FORCE
@
PYTHONPATH
=
.
$(
PYTHON
)
-c
"import pydgets; print(pydgets.__version__);"
#-------------------------------------------------------------------------------
deps
:
deps-python deps-python-dev
deps-python
:
FORCE
@
echo
"
\n
${
GREEN
}
*** Installing Python dependencies ***
${
NC
}
\n
"
-
@
$(
PIP
)
install
-r
requirements.pip
--upgrade
deps-python-dev
:
FORCE
@
echo
"
\n
${
GREEN
}
*** Installing Python dependencies ***
${
NC
}
\n
"
@$(
PIP
)
install
-r
requirements-dev.pip
--upgrade
#-------------------------------------------------------------------------------
pyflakes
:
pyflakes-lib pyflakes-test
pyflakes-lib
:
FORCE
@
echo
"
\n
${
GREEN
}
*** Checking code with pyflakes ***
${
NC
}
\n
"
@$(
PYTHON
)
--version
@
echo
""
-
@
$(
PYTHON
)
-m
pyflakes
$(
DIR_LIB
)
/
*
.py
pyflakes-test
:
FORCE
@
echo
"
\n
${
GREEN
}
*** Checking test files with pyflakes ***
${
NC
}
\n
"
@$(
PYTHON
)
--version
@
echo
""
-
@
$(
PYTHON
)
-m
pyflakes
$(
DIR_LIB
)
/tests/
*
.py
pylint
:
pylint-lib pylint-test
pylint-lib
:
FORCE
@
echo
"
\n
${
GREEN
}
*** Checking code with pylint ***
${
NC
}
\n
"
@$(
PYTHON
)
--version
@
echo
""
-
@
$(
PYTHON
)
-m
pylint
$(
DIR_LIB
)
/
*
.py
--rcfile
.pylintrc-lib
pylint-test
:
FORCE
@
echo
"
\n
${
GREEN
}
*** Checking test files with pylint ***
${
NC
}
\n
"
@$(
PYTHON
)
--version
@
echo
""
-
@
$(
PYTHON
)
-m
pylint
$(
DIR_LIB
)
/tests/
*
.py
--rcfile
.pylintrc-test
test
:
FORCE
@
echo
"
\n
${
GREEN
}
*** Checking code with nosetests ***
${
NC
}
\n
"
@$(
NOSETESTS
)
#-------------------------------------------------------------------------------
archive
:
FORCE
@
if
!
[
`
ls
dist/pydgets
*
|
wc
-l
`
=
"0"
]
;
then
\
echo
"
\n
${
GREEN
}
*** Moving old distribution files to archive ***
${
NC
}
\n
"
;
\
mv
-f
dist/pydgets
*
archive
;
\
fi
bdist
:
FORCE
@
echo
"
\n
${
GREEN
}
*** Building Python packages ***
${
NC
}
\n
"
@$(
PYTHON
)
--version
@
echo
""
@$(
PYTHON
)
setup.py sdist bdist_wheel
install
:
FORCE
@
echo
"
\n
${
GREEN
}
*** Performing local installation ***
${
NC
}
\n
"
@$(
PIP
)
install
dist/pydgets
*
.whl
--upgrade
# Put it first so that "make" without argument is like "make help".
help
:
@$(
SPHINXBUILD
)
-M
help
"
$(
SOURCEDIR
)
"
"
$(
BUILDDIR
)
"
$(
SPHINXOPTS
)
$(
O
)
deploy
:
FORCE
@
echo
"
\n
${
GREEN
}
*** Deploying packages to PyPI ***
${
NC
}
\n
"
@$(
TWINE
)
upload dist/
*
--skip-existing
.PHONY
:
help Makefile
# Catch-all target: route all unknown targets to Sphinx using the new
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
%
:
Makefile
@$(
SPHINXBUILD
)
-M
$@
"
$(
SOURCEDIR
)
"
"
$(
BUILDDIR
)
"
$(
SPHINXOPTS
)
$(
O
)
# Empty rule as dependency will force make to always perform target
# Source: https://www.gnu.org/software/make/manual/html_node/Force-Targets.html
FORCE
:
This diff is collapsed.
Click to expand it.
Makefile-dep
deleted
100644 → 0
+
0
−
44
View file @
189f298b
#-------------------------------------------------------------------------------
# Copyright (C) since 2016 Jan Mach <honza.mach.ml@gmail.com>
# Use of this source is governed by the MIT license, see LICENSE file.
#-------------------------------------------------------------------------------
DOCDIR = doc
DIST_SIZE:=$(shell ls dist | wc -l)
all: archive bdist deploy
# Perform unit tests
test:
$(info Testing source code)
nosetests
# Move old distribution files to archive directory
archive:
$(info Checking if dist archivation is needed)
@if ! [ `ls dist | wc -l` = "0" ]; then\
echo "Moving old distribution files to archive";\
mv -f dist/* archive;\
fi
# Build various Python package distributions
bdist:
$(info Building distributions)
# Build and upload (insecure)
#python3 setup.py sdist bdist_wheel upload
# Build only
python3 setup.py sdist bdist_wheel
# Perform installation from local files for both Python v2 and v3
install:
$(info Local installation)
sudo pip3 install dist/idea*.whl
# Deploy latest packages to PyPI
deploy:
$(info PyPI deployment)
# Secure upload with Twine
twine upload dist/*
This diff is collapsed.
Click to expand it.
requirements-dev.pip
0 → 100644
+
9
−
0
View file @
cd1d4efc
setuptools
wheel
twine
docutils<0.18
nose==1.3.7
pyflakes==2.1.0
pylint==2.2.2
sphinx==1.8.4
sphinx-rtd-theme==0.4.2
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment