Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

De-vendor pre-built binaries #1152

Merged
merged 11 commits into from
Aug 15, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
21 changes: 21 additions & 0 deletions etc/release/build-plugins.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
#!/bin/bash
#
# Copyright (c) 2018 nexB Inc. http://www.nexb.com/ - All rights reserved.
#

# ScanCode release script
# This script builds wheels for plugins in the plugins/ directory

set -e

# un-comment to trace execution
# set -x

for i in `ls plugins`
do
pushd plugins/$i
rm -rf dist build
python setup.py release
cp `find dist/ -type f` ../../thirdparty/prod/
popd
done
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/
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.38.1',
license='lgpl-2.1 and unrar and brian-gladman-3-clause',
description=desc,
long_description=desc,
author='nexB',
author_email='[email protected]',
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,48 @@
#
# 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):
curr_dir = dirname(abspath(__file__))
lib_dir = join(curr_dir, 'bin')
locations = {
'extractcode.sevenzip.libdir': lib_dir,
'extractcode.sevenzip.exe': join(lib_dir, '7z'),
}
return locations
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.
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
about_resource:
- 7z
- 7z.so

version: 9.38.1
name: p7zip

home_url: http://sourceforge.net/projects/p7zip/

download_url: http://master.dl.sourceforge.net/project/p7zip/p7zip/9.38.1/p7zip_9.38.1_src_all.tar.bz2

license_expression: lgpl-2.1-plus and unrar and brian-gladman-3-clause
copyright: Copyright (C) Igor Pavlov

notice_file: 7zip.NOTICE
license_file: lgpl-2.1.LICENSE
2 changes: 2 additions & 0 deletions plugins/extractcode-7z-manylinux1_i686/.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-manylinux1_i686/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-manylinux1_i686/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-manylinux1_i686/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-manylinux1_i686/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 manylinux1_i686
49 changes: 49 additions & 0 deletions plugins/extractcode-7z-manylinux1_i686/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.38.1',
license='lgpl-2.1 and unrar and brian-gladman-3-clause',
description=desc,
long_description=desc,
author='nexB',
author_email='[email protected]',
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',
],
},
)
Loading