Sets a standard header in all source files
Project description
setup_headers
Sets a standard header in all source files.
Traverses a project directory tree finding all files matching a sequence of extensions (e.g. py
,cfg
,yml
), and replaces any comments on the beginning of the file by a set of lines from a header file, preceded by a comment marker.
The substitution does not apply to "hashbangs" markers (anything started by #!
)
Installation
pip install jfaleiro.setup_headers
Configuration
Change your setup.py
to reflect something like this:
...
from setup_headers import LicenseHeaderCommand
...
setup(
...
cmdclass={
'license_headers': LicenseHeaderCommand,
},
...
)
Add your preferences to setup.cfg
:
[license_headers]
header-file = HEADER
extensions = py,cfg,yml
Create a file mathing the name on header_file
that you want to be inserted on the beginning of all files that match *.[extensions]
- something like:
my_awesome_project - Does something awesome
Copyright (C) 2019 Joe Doe.
This program is not free. You should pay lots of money to use it.
Contact me for my paypal account.
You should have received a copy of My Proprietary License
along with this program. If not, see <http://joe.doe/licenses/>.
Use
Just issue the command you have previously configured:
python setup.py license_headers
And that should be it.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distribution
Hashes for jfaleiro.setup_headers-0.0.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | eafe695d7fca8151b64ccae9a42896728857cf4533432201c8f777154b264730 |
|
MD5 | 86fd51871203433a87dd57ca87380dc4 |
|
BLAKE2b-256 | 8097b671b660fce0f6a97f25311ec34abbe830929311cfbefafebc94791c3030 |