forked from Ericsson/codechecker
-
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.
Create pip package from tu-collector
- Loading branch information
1 parent
8a5265d
commit c723d68
Showing
8 changed files
with
171 additions
and
7 deletions.
There are no files selected for viewing
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,3 @@ | ||
build/ | ||
dist/ | ||
tu_collector.egg-info |
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 @@ | ||
[distutils] | ||
index-servers = | ||
pypi | ||
testpypi | ||
|
||
[pypi] | ||
repository: https://upload.pypi.org/legacy/ | ||
|
||
[testpypi] | ||
repository: https://test.pypi.org/legacy/ |
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,39 @@ | ||
University of Illinois/NCSA Open Source License | ||
|
||
Copyright (c) 2015 Ericsson. | ||
All rights reserved. | ||
|
||
Developed by: | ||
|
||
CodeChecker Team | ||
|
||
Ericsson | ||
|
||
http://www.ericsson.com | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy of | ||
this software and associated documentation files (the "Software"), to deal with | ||
the Software without restriction, including without limitation the rights to | ||
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies | ||
of the Software, and to permit persons to whom the Software is furnished to do | ||
so, subject to the following conditions: | ||
|
||
* Redistributions of source code must retain the above copyright notice, | ||
this list of conditions and the following disclaimers. | ||
|
||
* Redistributions in binary form must reproduce the above copyright notice, | ||
this list of conditions and the following disclaimers in the | ||
documentation and/or other materials provided with the distribution. | ||
|
||
* Neither the names of the CodeChecker Team, Ericsson, nor the names of | ||
its contributors may be used to endorse or promote products derived | ||
from this Software without specific prior written permission. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS | ||
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
CONTRIBUTORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS WITH THE | ||
SOFTWARE. | ||
|
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,2 @@ | ||
include README.md | ||
include *.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
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,49 @@ | ||
# tu-collector | ||
`tu-collector` is a python tool which collects the source files constituting a | ||
translation unit. This script does this action based on a compilation database | ||
JSON file. The output of the script is a ZIP package with the collected | ||
sources. | ||
|
||
## Install guide | ||
```sh | ||
# Create a Python virtualenv and set it as your environment. | ||
make venv | ||
source $PWD/venv/bin/activate | ||
|
||
# Build and install tu-collector package. | ||
make package | ||
``` | ||
|
||
## Usage | ||
```sh | ||
usage: tu_collector.py [-h] (-b COMMAND | -l LOGFILE) -z ZIP [-f FILTER] | ||
|
||
This script collects all the source files constituting specific translation | ||
units. The files are written to a ZIP file which will contain the sources | ||
preserving the original directory hierarchy. | ||
|
||
optional arguments: | ||
-h, --help show this help message and exit | ||
-z ZIP, --zip ZIP Output ZIP file. | ||
-f FILTER, --filter FILTER | ||
This flag restricts the collection on the build | ||
actions of which the compiled source file matches this | ||
path. E.g.: /path/to/*/files | ||
|
||
log arguments: | ||
Specify how the build information database should be obtained. You need to | ||
specify either an already existing log file, or a build command which will | ||
be used to generate a log file on the fly. | ||
|
||
-b COMMAND, --build COMMAND | ||
Execute and record a build command. Build commands can | ||
be simple calls to 'g++' or 'clang++'. | ||
-l LOGFILE, --logfile LOGFILE | ||
Use an already existing JSON compilation command | ||
database file specified at this path. | ||
``` | ||
|
||
## License | ||
|
||
The project is licensed under University of Illinois/NCSA Open Source License. | ||
See LICENSE.TXT for details. |
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,37 @@ | ||
#!/usr/bin/env python | ||
# -*- coding: utf-8 -*- | ||
|
||
import setuptools | ||
|
||
with open("README.md", "r") as fh: | ||
long_description = fh.read() | ||
|
||
setuptools.setup( | ||
name="tu_collector", | ||
version="0.1.0", | ||
author='CodeChecker Team (Ericsson)', | ||
description="Collect the source files constituting a translation unit.", | ||
long_description=long_description, | ||
long_description_content_type="text/markdown", | ||
url="https://github.com/Ericsson/CodeChecker", | ||
keywords=['tu-collector', 'translation unit', 'collector', | ||
'compilation database'], | ||
license='LICENSE.txt', | ||
packages=setuptools.find_packages(), | ||
include_package_data=True, | ||
classifiers=[ | ||
"Environment :: Console", | ||
"Intended Audience :: Developers", | ||
"License :: OSI Approved :: University of Illinois/NCSA Open Source License", | ||
"Operating System :: MacOS", | ||
"Operating System :: POSIX", | ||
"Programming Language :: Python :: 2.7", | ||
"Programming Language :: Python :: 3", | ||
"Programming Language :: Python :: 3.5", | ||
], | ||
entry_points={ | ||
'console_scripts': [ | ||
'tu-collector = tu_collector.tu_collector:main' | ||
] | ||
}, | ||
) |