Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Unified Diff: eyeo-depup/src/dependencies.py

Issue 29599579: OffTopic: DependencyUpdater
Patch Set: Created Nov. 27, 2017, 9:40 a.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: eyeo-depup/src/dependencies.py
diff --git a/patchconv/setup.py b/eyeo-depup/src/dependencies.py
similarity index 61%
copy from patchconv/setup.py
copy to eyeo-depup/src/dependencies.py
index a36724b2037022b0a3115a63a4f31cb303b4a714..b94f430e02fa8857adb580943ca122c865b93c91 100644
--- a/patchconv/setup.py
+++ b/eyeo-depup/src/dependencies.py
@@ -13,14 +13,22 @@
# You should have received a copy of the GNU General Public License
# along with Adblock Plus. If not, see <http://www.gnu.org/licenses/>.
-from setuptools import setup
+"""Script run ensure_dependencies.get_deps() externally."""
+from __future__ import print_function
-setup(
- name='patchconv',
- version='0.1',
- py_modules=['patchconv'],
- entry_points={
- 'console_scripts': ['patchconv=patchconv:main']
- }
-)
+import json
+import os
+import sys
+
+
+def dep_as_json():
+ """Read configured dependencies via ensure_dependencies.get_deps()."""
+ cwd = os.getcwd()
+ sys.path.append(cwd)
+ import ensure_dependencies
+ return json.dumps(ensure_dependencies.read_deps(cwd), indent=4)
+
+
+if __name__ == '__main__':
+ print(dep_as_json())

Powered by Google App Engine
This is Rietveld