{ "info": { "author": "Peter Hill", "author_email": "peter@fusionplasma.co.uk", "bugtrack_url": null, "classifiers": [ "Development Status :: 3 - Alpha", "License :: OSI Approved :: MIT License", "Programming Language :: Fortran", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.3", "Programming Language :: Python :: 3.4", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6" ], "description": "fortdepend\n==========\n\n[![Build Status](https://travis-ci.org/ZedThree/fort_depend.py.svg?branch=master)](https://travis-ci.org/ZedThree/fort_depend.py)\n[![codecov](https://codecov.io/gh/ZedThree/fort_depend.py/branch/master/graph/badge.svg)](https://codecov.io/gh/ZedThree/fort_depend.py)\n\nA python script to automatically generate Fortran dependencies.\n\nGiven a set of files, `fortdepend` automatically constructs the\ndependency graph for the programs and files and can write a dependency\nfile suitable for Makefiles. `fortdepend` now uses [`pcpp`][pcpp], a\npreprocessor written in Python, so it can determine which modules will\nactually be used when you compile.\n\nYou can even use `fortdepend` to draw the graph of the module\ndependencies (requires [`graphviz`][graphviz])!\n\nComplete documentation is available [on ReadTheDocs][docs].\n\nOriginal script by D. Dickinson\n\nInstallation\n============\n\nYou can install fortdepend with pip:\n\n pip3 install --user fortdepend\n\nLimitations\n===========\n\n`fortdepend` requires Python 3.\n\n`fortdepend` works by looking for matching pairs of `program\n/end program ` and `module /end module `, and\nso will not work on Fortran 77-style files that just use `end` without\nthe appropriate label.\n\nUsage\n=====\n\nBasic usage:\n------------\n\n fortdepend -o Makefile.dep\n\nThis will look for all files ending in `.f90` or `.F90` in the current\ndirectory and write the output to `Makefile.dep`. The output will\nsomething like this:\n\n test : \\\n moduleA.o \\\n moduleB.o \\\n moduleC.o \\\n moduleD.o \\\n programTest.o\n\n moduleA.o :\n\n moduleB.o : \\\n moduleA.o\n\n moduleC.o : \\\n moduleA.o \\\n moduleB.o\n\n moduleD.o : \\\n moduleC.o\n\nYou could then get a basic makefile working by putting the following\nin `Makefile`:\n\n .f90.o:\n gfortran -c $<\n\n test:\n gfortran $^ -o $@\n\n include Makefile.dep\n\nAnd `make test` will magically build everything in the correct order!\n\nMove advanced use\n-----------------\n\nYou can specify preprocessor macros with `-D` and search paths with `-I`:\n\n fortdepend -DMACRO=42 -Isome/include/dir -o Makefile.dep\n\nwill replace instances of `MACRO` with `42` according to the usual C99\npreprocessor rules. This can be used to conditionally `use` some\nmodules or change which module is `use`d at compile time.\n\nFull command line arguments:\n\n $ fortdepend --help\n usage: fortdepend [-h] [-f FILES [FILES ...]] [-D NAME[=DESCRIPTION]\n [NAME[=DESCRIPTION] ...]] [-b BUILD] [-o OUTPUT] [-g] [-v]\n [-w] [-c] [-e EXCLUDE_FILES [EXCLUDE_FILES ...]]\n [-i IGNORE_MODULES [IGNORE_MODULES ...]]\n\n Generate Fortran dependencies\n\n optional arguments:\n -h, --help show this help message and exit\n -f FILES [FILES ...], --files FILES [FILES ...]\n Files to process\n -D NAME[=DESCRIPTION] [NAME[=DESCRIPTION] ...]\n Preprocessor define statements\n -I dir Add dir to the preprocessor search path\n -b BUILD, --build BUILD\n Build Directory (prepended to all files in output)\n -o OUTPUT, --output OUTPUT\n Output file\n -g, --graph Make a graph of the project\n -v, --verbose explain what is done\n -w, --overwrite Overwrite output file without warning\n -c, --colour Print in colour\n -e EXCLUDE_FILES [EXCLUDE_FILES ...], --exclude-files EXCLUDE_FILES [EXCLUDE_FILES ...]\n Files to exclude\n -i IGNORE_MODULES [IGNORE_MODULES ...], --ignore-modules IGNORE_MODULES [IGNORE_MODULES ...]\n Modules to ignore\n --skip-programs Don't include programs in the output file\n -n, --no-preprocessor\n Don't use the preprocessor\n\nHere's a slightly more advanced example of how to use `fortdepend` in\nyour makefiles:\n\n # Script to generate the dependencies\n MAKEDEPEND=/path/to/fortdepend\n\n # $(DEP_FILE) is a .dep file generated by fortdepend\n DEP_FILE = my_project.dep\n\n # Source files to compile\n OBJECTS = mod_file1.f90 \\\n mod_file2.f90\n\n # Make sure everything depends on the .dep file\n all: $(actual_executable) $(DEP_FILE)\n\n # Make dependencies\n .PHONY: depend\n depend: $(DEP_FILE)\n\n # The .dep file depends on the source files, so it automatically gets updated\n # when you change your source\n $(DEP_FILE): $(OBJECTS)\n @echo \"Making dependencies!\"\n cd $(SRCPATH) && $(MAKEDEPEND) -w -o /path/to/$(DEP_FILE) -f $(OBJECTS)\n\n include $(DEP_FILE)\n\nThis will automatically rebuild the dependency file if any of the\nsource files change. You might not like to do this if you have a lot\nof files and need to preprocess them!\n\n[pcpp]: https://github.com/ned14/pcpp\n[graphviz]: https://github.com/xflr6/graphviz\n[docs]: https://fortdepend.readthedocs.io/en/latest/\n\n\n", "description_content_type": "text/markdown", "docs_url": null, "download_url": "https://github.com/ZedThree/fort_depend.py/tarball/0.1.0", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/ZedThree/fort_depend.py/", "keywords": "build,dependencies,fortran", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "fortdepend", "package_url": "https://pypi.org/project/fortdepend/", "platform": "", "project_url": "https://pypi.org/project/fortdepend/", "project_urls": { "Download": "https://github.com/ZedThree/fort_depend.py/tarball/0.1.0", "Homepage": "https://github.com/ZedThree/fort_depend.py/" }, "release_url": "https://pypi.org/project/fortdepend/2.0.0/", "requires_dist": [ "colorama (>=0.3.9)", "pcpp (>=1.1.0)", "sphinx (>=1.4); extra == 'docs'", "sphinx-argparse (>=0.2.3); extra == 'docs'", "pytest (>=3.3.0); extra == 'tests'" ], "requires_python": "", "summary": "Automatically generate Fortran dependencies", "version": "2.0.0" }, "last_serial": 4485348, "releases": { "0.1.0": [ { "comment_text": "", "digests": { "md5": "a432bab565f603167db8565a2cd07e4e", "sha256": "b8177651ba1bd6778cb1b5cf824a210a5439d1df679beff8121bc3c6897fb188" }, "downloads": -1, "filename": "fortdepend-0.1.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "a432bab565f603167db8565a2cd07e4e", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 8862, "upload_time": "2017-08-25T08:42:52", "url": "https://files.pythonhosted.org/packages/6d/c5/87b258bbb515f24bf2d6f2eff6a706d9bd536baf81d54a85155390aece11/fortdepend-0.1.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "806b0a3ad9c27a73df5aed04b1f1528e", "sha256": "d6e65d4392ea233c1add7594d4864636b68a5fc288b4a0ba6a7f48e587c8d3b0" }, "downloads": -1, "filename": "fortdepend-0.1.0.tar.gz", "has_sig": false, "md5_digest": "806b0a3ad9c27a73df5aed04b1f1528e", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5951, "upload_time": "2017-08-25T08:42:53", "url": "https://files.pythonhosted.org/packages/5b/8c/6e113314a008690fe5bf9b3b16787fd34e9577f57a3b6e6915373e6b19be/fortdepend-0.1.0.tar.gz" } ], "2.0.0": [ { "comment_text": "", "digests": { "md5": "af5c850636c027285e1dc0a05f921060", "sha256": "cc153a8095d0a3132ba83a9ad25e5ccc243fdeda1d54bf04d6111ebd0275b928" }, "downloads": -1, "filename": "fortdepend-2.0.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "af5c850636c027285e1dc0a05f921060", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 12794, "upload_time": "2018-11-14T12:08:12", "url": "https://files.pythonhosted.org/packages/93/fe/83e550c92707405ba03445788839578f365c039af2c018dfd06278285e04/fortdepend-2.0.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "ad7941d9a9be4330f847adc8bde78ee6", "sha256": "f563f4ac4bc1f6cea595a867ce5b33f16881eb29c88641f90444c17ecdebb9e9" }, "downloads": -1, "filename": "fortdepend-2.0.0.tar.gz", "has_sig": false, "md5_digest": "ad7941d9a9be4330f847adc8bde78ee6", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 12141, "upload_time": "2018-11-14T12:08:14", "url": "https://files.pythonhosted.org/packages/47/a5/e5d8e9525733007ec336b2d248c43c2317077f43579dc35047a4372df63c/fortdepend-2.0.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "af5c850636c027285e1dc0a05f921060", "sha256": "cc153a8095d0a3132ba83a9ad25e5ccc243fdeda1d54bf04d6111ebd0275b928" }, "downloads": -1, "filename": "fortdepend-2.0.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "af5c850636c027285e1dc0a05f921060", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 12794, "upload_time": "2018-11-14T12:08:12", "url": "https://files.pythonhosted.org/packages/93/fe/83e550c92707405ba03445788839578f365c039af2c018dfd06278285e04/fortdepend-2.0.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "ad7941d9a9be4330f847adc8bde78ee6", "sha256": "f563f4ac4bc1f6cea595a867ce5b33f16881eb29c88641f90444c17ecdebb9e9" }, "downloads": -1, "filename": "fortdepend-2.0.0.tar.gz", "has_sig": false, "md5_digest": "ad7941d9a9be4330f847adc8bde78ee6", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 12141, "upload_time": "2018-11-14T12:08:14", "url": "https://files.pythonhosted.org/packages/47/a5/e5d8e9525733007ec336b2d248c43c2317077f43579dc35047a4372df63c/fortdepend-2.0.0.tar.gz" } ] }