forked from coala/coala-bears
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Build setup.py and requirements files using moban
coala-mobans provides a set of metadata common to all repositories, with local overrides. The bear parser now creates bear-requirements.yaml which is loaded by moban to generate the bear-requirements.txt, Gemfile and package.json. Continues coala/coala#4897
- Loading branch information
Showing
15 changed files
with
357 additions
and
87 deletions.
There are no files selected for viewing
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
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
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 |
---|---|---|
@@ -0,0 +1,10 @@ | ||
source 'https://rubygems.org' | ||
ruby '2.2.2' | ||
|
||
{% for name, data in gem_requirements.items() | sort %} | ||
{% if data is mapping %} | ||
gem "{{ name + '", "' + data.version + '", require: false' }} | ||
{% else %} | ||
gem "{{ name + '", require: false' }} | ||
{% endif %}{# if data is mapping #} | ||
{% endfor %}{# for name, data in gem_requirements.items() #} |
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 |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{% for package, data in pip_requirements.items() | sort %} | ||
{{ package }}{{ data.version }} | ||
{% endfor %}{# for package, data in pip_requirements.items() #} |
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 |
---|---|---|
@@ -0,0 +1,19 @@ | ||
{% extends 'coala-setup.py.jj2' %} | ||
|
||
{% block custom_requirements %} | ||
with open('bear-requirements.txt') as requirements: | ||
bear_required = requirements.read().splitlines() | ||
|
||
with open('ignore.txt') as ignore: | ||
ignore_requirements = ignore.read().splitlines() | ||
|
||
extras_require = { | ||
'alldeps': bear_required, | ||
} | ||
|
||
# For the average user we leave out some of the more complicated requirements, | ||
# e.g. language-check (needs java). | ||
required += [req for req in bear_required | ||
if not any(req.startswith(ignore) | ||
for ignore in ignore_requirements)] | ||
{% endblock %} |
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 |
---|---|---|
@@ -0,0 +1,13 @@ | ||
{ | ||
"name": "coala-bears", | ||
"version": "0.8.0", | ||
"dependencies": { | ||
{% for package, data in npm_requirements.items() | sort %} | ||
{% if not loop.last %} | ||
"{{ package }}": "{{ data.version }}", | ||
{% else %} | ||
"{{ package }}": "{{ data.version }}" | ||
{% endif %}{# if not loop.last #} | ||
{% endfor %}{# for package, data in npm_requirements.items() #} | ||
} | ||
} |
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 |
---|---|---|
@@ -0,0 +1,8 @@ | ||
# NOTE: This file is parsed by .ci/generate_bear_requirements.py | ||
# Edit coala_dependency in coala-build.yaml | ||
coala{{ coala_dependency }} | ||
# Dependencies inherited from coala | ||
# coala_utils | ||
# dependency_management | ||
# requests | ||
-r bear-requirements.txt |
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 |
---|---|---|
@@ -0,0 +1,30 @@ | ||
overrides: bear-requirements.yaml | ||
|
||
name: coala-bears | ||
description: "Bears for coala (Code Analysis Application)" | ||
build_version: 0.12.0.dev99999999999999 | ||
current_version: 0.12.0.dev | ||
version: 0.12.0.dev | ||
release: 0.12.0.dev | ||
branch: master | ||
package_module: bears | ||
docs_output_dir: docs/API | ||
entry_points: | ||
coalabears: | ||
- coala_official_bears = bears | ||
|
||
configuration: | ||
template_dir: | ||
- .moban.dt/ | ||
- .ci/ | ||
- ../coala-mobans/templates/ | ||
- ../setupmobans/templates/ | ||
configuration: .moban.yaml | ||
configuration_dir: ../coala-mobans/ | ||
targets: | ||
- setup.py: bears-setup.py.jj2 | ||
- requirements.txt: requirements.txt.jj2 | ||
- bears/VERSION: VERSION.jj2 | ||
- Gemfile: Gemfile.jj2 | ||
- package.json: package.json.jj2 | ||
- bear-requirements.txt: bear-requirements.txt.jj2 |
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
Oops, something went wrong.