mirror of
https://github.com/loot/libloot.git
synced 2026-07-27 14:16:01 -07:00
Keep copyright licenses in their own directory
This commit is contained in:
@@ -7,35 +7,35 @@ Copyright License Texts
|
||||
GNU General Public License 3.0
|
||||
------------------------------
|
||||
|
||||
.. include:: GPL-3.0-or-later
|
||||
.. include:: licenses/GPL-3.0-or-later
|
||||
:literal:
|
||||
|
||||
GNU Free Documentation License 1.3
|
||||
----------------------------------
|
||||
|
||||
.. include:: GFDL-1.3-no-invariants-or-later
|
||||
.. include:: licenses/GFDL-1.3-no-invariants-or-later
|
||||
:literal:
|
||||
|
||||
Apache License 2.0
|
||||
------------------
|
||||
|
||||
.. include:: Apache-2.0
|
||||
.. include:: licenses/Apache-2.0
|
||||
:literal:
|
||||
|
||||
BSD 3-Clause "New" or "Revised" License
|
||||
---------------------------------------
|
||||
|
||||
.. include:: Apache-2.0
|
||||
.. include:: licenses/BSD-3-Clause
|
||||
:literal:
|
||||
|
||||
MIT License
|
||||
-----------
|
||||
|
||||
.. include:: MIT
|
||||
.. include:: licenses/MIT
|
||||
:literal:
|
||||
|
||||
Unicode License v3
|
||||
------------------
|
||||
|
||||
.. include:: Unicode-3.0
|
||||
.. include:: licenses/Unicode-3.0
|
||||
:literal:
|
||||
+1
-1
@@ -10,7 +10,7 @@ libloot
|
||||
api/sorting
|
||||
api/rust_api_reference
|
||||
api/cpp_api_reference
|
||||
api/licenses/index
|
||||
api/copyright/index
|
||||
api/changelog
|
||||
|
||||
.. toctree::
|
||||
|
||||
@@ -13,7 +13,7 @@ import shutil
|
||||
import subprocess
|
||||
import tomllib
|
||||
|
||||
def process_licenses(attribution_dir, destination_dir):
|
||||
def process_licenses(source_dir, destination_dir):
|
||||
# CC0, Unlicense and Zlib don't need licenses to be included.
|
||||
# MPL doesn't need the license included with binary distributions, and
|
||||
# allows distribution under a compatible license.
|
||||
@@ -30,7 +30,7 @@ def process_licenses(attribution_dir, destination_dir):
|
||||
'Zlib'
|
||||
]
|
||||
|
||||
for entry in os.scandir(os.path.join(attribution_dir, 'licenses')):
|
||||
for entry in os.scandir(source_dir):
|
||||
if entry.name not in skip_entries:
|
||||
destination_path = os.path.join(destination_dir, entry.name)
|
||||
if entry.is_dir():
|
||||
@@ -78,9 +78,9 @@ def get_target_dependency_names(target_package_name):
|
||||
|
||||
if __name__ == "__main__":
|
||||
target_package_name = 'libloot-cpp'
|
||||
cargo_toml_path = '../cpp/Cargo.toml'
|
||||
attribution_dir = 'build/attribution'
|
||||
output_dir = 'api/licenses'
|
||||
cargo_toml_path = os.path.join('..', 'cpp', 'Cargo.toml')
|
||||
attribution_dir = os.path.join('build', 'attribution')
|
||||
output_dir = os.path.join('api', 'copyright')
|
||||
|
||||
subprocess.run(
|
||||
[
|
||||
@@ -97,7 +97,7 @@ if __name__ == "__main__":
|
||||
check=True
|
||||
)
|
||||
|
||||
process_licenses(attribution_dir, output_dir)
|
||||
process_licenses(os.path.join(attribution_dir, 'licenses'), os.path.join(output_dir, 'licenses'))
|
||||
|
||||
target_dependency_names = get_target_dependency_names(target_package_name)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user