Skip to content

Commit

Permalink
Add plugins for 7zip #469
Browse files Browse the repository at this point in the history
Signed-off-by: Philippe Ombredanne <pombredanne@nexb.com>
  • Loading branch information
pombredanne committed Aug 9, 2018
1 parent 667fd11 commit ff71573
Show file tree
Hide file tree
Showing 67 changed files with 4,087 additions and 0 deletions.
2 changes: 2 additions & 0 deletions plugins/extractcode-7z-macosx_10_9_intel/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
/build/
/dist/
71 changes: 71 additions & 0 deletions plugins/extractcode-7z-macosx_10_9_intel/LICENSE.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
7-Zip Copyright (C) 1999-2010 Igor Pavlov.

Licenses for files are:

1) CPP/7zip/Compress/Rar* files: LGPL-2.1 and unRAR restriction
2) the file in CPP/7zip/Crypto/AES files are under LGPL-2.1 and the
Brian Gladman 3-Clause License
3) All other files: LGPL-2.1

The LGPL-2.1 and unRAR restriction means that you must follow both
LGPL-2.1 rules and unRAR restriction rules.

GNU LGPL information
--------------------

This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.

This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.

You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA


unRAR restriction
-----------------

The decompression engine for RAR archives was developed using source
code of unRAR program.
All copyrights to original unRAR code are owned by Alexander Roshal.

The license for original unRAR code has the following restriction:

The unRAR sources cannot be used to re-create the RAR compression
algorithm, which is proprietary. Distribution of modified unRAR sources
in separate form or as a part of other software is permitted, provided
that it is clearly stated in the documentation and source comments that
the code may not be used to develop a RAR (WinRAR) compatible archiver.


Brian Gladman 3-Clause License
------------------------------

Copyright (c) 2001, Dr Brian Gladman

LICENSE TERMS

The free distribution and use of this software in both source and binary
form is allowed (with or without changes) provided that:

1. distributions of this source code include the above copyright
notice, this list of conditions and the following disclaimer;

2. distributions in binary form include the above copyright
notice, this list of conditions and the following disclaimer
in the documentation and/or other associated materials;

3. the copyright holder's name is not used to endorse products
built using this software without specific written permission.

DISCLAIMER

This software is provided 'as is' with no explicit or implied warranties
in respect of its properties, including, but not limited to, correctness
and fitness for purpose.
9 changes: 9 additions & 0 deletions plugins/extractcode-7z-macosx_10_9_intel/MANIFEST.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
graft src

include setup.py
include setup.cfg
include .gitignore
include README.md
include MANIFEST.in

global-exclude *.py[co] __pycache__ *.*~
1 change: 1 addition & 0 deletions plugins/extractcode-7z-macosx_10_9_intel/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
A scanCode plugin to provide pre-built binary libraries and utilities and their locations
5 changes: 5 additions & 0 deletions plugins/extractcode-7z-macosx_10_9_intel/setup.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
[metadata]
license_file = LICENSE.txt

[aliases]
release = clean --all bdist_wheel --plat-name macosx_10_9_intel
49 changes: 49 additions & 0 deletions plugins/extractcode-7z-macosx_10_9_intel/setup.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
#!/usr/bin/env python
# -*- encoding: utf-8 -*-

from __future__ import absolute_import
from __future__ import print_function

from glob import glob
from os.path import basename
from os.path import join
from os.path import splitext

from setuptools import find_packages
from setuptools import setup


desc = '''A ScanCode path provider plugin to provide a prebuilt native sevenzip binary.'''

setup(
name='extractcode-7z',
version='9.20.1',
license='lgpl-2.1 and unrar and brian-gladman-3-clause',
description=desc,
long_description=desc,
author='nexB',
author_email='info@aboutcode.org',
url='https://github.com/nexB/scancode-toolkit',
packages=find_packages('src'),
package_dir={'': 'src'},
py_modules=[splitext(basename(path))[0] for path in glob('src/*.py')],
include_package_data=True,
zip_safe=False,
classifiers=[
# complete classifier list: http://pypi.python.org/pypi?%3Aaction=list_classifiers
'Development Status :: 5 - Production/Stable',
'Intended Audience :: Developers',
'Topic :: Utilities',
],
keywords=[
'open source', 'extractcode', 'libarchive'
],
install_requires=[
'scancode-toolkit',
],
entry_points={
'scancode_location_provider': [
'extractcode-7zip = extractcode_7z:SevenzipPaths',
],
},
)
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
#
# Copyright (c) 2018 nexB Inc. and others. All rights reserved.
# http://nexb.com and https://github.com/nexB/scancode-toolkit/
# The ScanCode software is licensed under the Apache License version 2.0.
# Data generated with ScanCode require an acknowledgment.
# ScanCode is a trademark of nexB Inc.
#
# You may not use this software except in compliance with the License.
# You may obtain a copy of the License at: http://apache.org/licenses/LICENSE-2.0
# Unless required by applicable law or agreed to in writing, software distributed
# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
# CONDITIONS OF ANY KIND, either express or implied. See the License for the
# specific language governing permissions and limitations under the License.
#
# When you publish or redistribute any data created with ScanCode or any ScanCode
# derivative work, you must accompany this data with the following acknowledgment:
#
# Generated with ScanCode and provided on an "AS IS" BASIS, WITHOUT WARRANTIES
# OR CONDITIONS OF ANY KIND, either express or implied. No content created from
# ScanCode should be considered or used as legal advice. Consult an Attorney
# for any legal advice.
# ScanCode is a free software code scanning tool from nexB Inc. and others.
# Visit https://github.com/nexB/scancode-toolkit/ for support and download.

from __future__ import absolute_import
from __future__ import unicode_literals

from os.path import abspath
from os.path import dirname
from os.path import join

from plugincode.location_provider import LocationProviderPlugin
from plugincode.location_provider import location_provider_impl


from plugincode.location_provider import LocationProviderPlugin
from plugincode.location_provider import location_provider_impl


class SevenzipPaths(LocationProviderPlugin):
def get_locations(self):
from extractcode.sevenzip import EXTRACTCODE_7ZIP_EXE
from extractcode.sevenzip import EXTRACTCODE_7ZIP_LIBDIR
curr_dir = dirname(abspath(__file__))
lib_dir = join(curr_dir, 'bin')
locations = {
EXTRACTCODE_7ZIP_LIBDIR: lib_dir,
EXTRACTCODE_7ZIP_EXE: join(lib_dir, '7z'),
}
return locations
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
7-Zip Copyright (C) 1999-2010 Igor Pavlov.

Licenses for files are:

1) CPP/7zip/Compress/Rar* files: LGPL-2.1 and unRAR restriction
2) the file in CPP/7zip/Crypto/AES files are under LGPL-2.1 and the
Brian Gladman 3-Clause License
3) All other files: LGPL-2.1

The LGPL-2.1 and unRAR restriction means that you must follow both
LGPL-2.1 rules and unRAR restriction rules.

GNU LGPL information
--------------------

This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.

This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.

You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA


unRAR restriction
-----------------

The decompression engine for RAR archives was developed using source
code of unRAR program.
All copyrights to original unRAR code are owned by Alexander Roshal.

The license for original unRAR code has the following restriction:

The unRAR sources cannot be used to re-create the RAR compression
algorithm, which is proprietary. Distribution of modified unRAR sources
in separate form or as a part of other software is permitted, provided
that it is clearly stated in the documentation and source comments that
the code may not be used to develop a RAR (WinRAR) compatible archiver.


Brian Gladman 3-Clause License
------------------------------

Copyright (c) 2001, Dr Brian Gladman

LICENSE TERMS

The free distribution and use of this software in both source and binary
form is allowed (with or without changes) provided that:

1. distributions of this source code include the above copyright
notice, this list of conditions and the following disclaimer;

2. distributions in binary form include the above copyright
notice, this list of conditions and the following disclaimer
in the documentation and/or other associated materials;

3. the copyright holder's name is not used to endorse products
built using this software without specific written permission.

DISCLAIMER

This software is provided 'as is' with no explicit or implied warranties
in respect of its properties, including, but not limited to, correctness
and fitness for purpose.
Loading

0 comments on commit ff71573

Please sign in to comment.