Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
21 changed files
with
344 additions
and
50 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
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,4 @@ | ||
[build-system] | ||
requires = [] | ||
build-backend = "pybuilder.pep517" | ||
backend-path = ["src/main/python"] |
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 |
---|---|---|
@@ -1,6 +1,4 @@ | ||
#!/usr/bin/env python | ||
# | ||
|
||
# -*- coding: utf-8 -*- | ||
# | ||
# This file is part of PyBuilder | ||
|
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
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
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,32 @@ | ||
# -*- coding: utf-8 -*- | ||
# | ||
# This file is part of PyBuilder | ||
# | ||
# Copyright 2011-2020 PyBuilder Team | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.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. | ||
|
||
import unittest | ||
|
||
from smoke_itest_support import SmokeIntegrationTestSupport | ||
|
||
|
||
class PEP517SmokeTest(SmokeIntegrationTestSupport): | ||
PROJECT_FILES = list(SmokeIntegrationTestSupport.PROJECT_FILES) + ["pyproject.toml"] | ||
|
||
def test_smoke_pep517_install(self): | ||
self.smoke_test_module("pip", "-vvvvvvvvvvvvvv", "install", ".") | ||
|
||
|
||
if __name__ == "__main__": | ||
unittest.main() |
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,32 @@ | ||
# -*- coding: utf-8 -*- | ||
# | ||
# This file is part of PyBuilder | ||
# | ||
# Copyright 2011-2020 PyBuilder Team | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.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. | ||
|
||
import unittest | ||
|
||
from smoke_itest_support import SmokeIntegrationTestSupport | ||
|
||
|
||
class SetupSmokeTest(SmokeIntegrationTestSupport): | ||
PROJECT_FILES = list(SmokeIntegrationTestSupport.PROJECT_FILES) + ["setup.py"] | ||
|
||
def test_smoke_setup_install(self): | ||
self.smoke_test_module("pip", "-vvvvvvvvvvvvvv", "install", ".") | ||
|
||
|
||
if __name__ == "__main__": | ||
unittest.main() |
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
Binary file removed
BIN
-1.3 MB
src/main/python/pybuilder/_vendor/virtualenv_support/pip-19.1.1-py2.py3-none-any.whl
Binary file not shown.
Binary file renamed
BIN
+1.35 MB
...v_support/pip-19.3.1-py2.py3-none-any.whl → ...v_support/pip-20.0.2-py2.py3-none-any.whl
Binary file not shown.
Binary file renamed
BIN
+569 KB
...rt/setuptools-42.0.2-py2.py3-none-any.whl → ...rt/setuptools-44.1.0-py2.py3-none-any.whl
Binary file not shown.
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,60 @@ | ||
# -*- coding: utf-8 -*- | ||
# | ||
# This file is part of PyBuilder | ||
# | ||
# Copyright 2011-2020 PyBuilder Team | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.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. | ||
|
||
from __future__ import unicode_literals | ||
|
||
import os | ||
import shutil | ||
|
||
|
||
def build_wheel(wheel_directory, config_settings=None, metadata_directory=None): | ||
def artifact_filter(artifact_name): | ||
return artifact_name.lower().endswith(".whl") | ||
|
||
return build_with_pyb(wheel_directory, "Wheel", artifact_filter, config_settings, metadata_directory) | ||
|
||
|
||
def build_sdist(sdist_directory, config_settings=None): | ||
def artifact_filter(artifact_name): | ||
return artifact_name.lower().endswith(".tar.gz") | ||
|
||
return build_with_pyb(sdist_directory, "SDist", artifact_filter, config_settings) | ||
|
||
|
||
def build_with_pyb(target_dir, artifact_name, artifact_filter, config_settings=None, metadata_directory=None): | ||
from pybuilder.cli import main | ||
# verbose, debug, skip all optional... | ||
if main("-v", "-X", "-o", "--reset-plugins", "clean", "publish"): | ||
raise RuntimeError("PyBuilder build failed") | ||
|
||
from pybuilder.reactor import Reactor | ||
from pybuilder.plugins.python.distutils_plugin import _get_generated_artifacts | ||
reactor = Reactor.current_instance() | ||
project = reactor.project | ||
logger = reactor.logger | ||
dist_dir, artifacts = _get_generated_artifacts(project, logger) | ||
|
||
filtered = list(filter(artifact_filter, artifacts)) | ||
if len(filtered) > 1: | ||
raise RuntimeError("Multiple project %ss found, don't know which to install: %r" % (artifact_name, filtered,)) | ||
if not filtered: | ||
raise RuntimeError("Project did not generate any %ss install: %r" % (artifact_name, artifacts,)) | ||
artifact = filtered[0] | ||
shutil.copy2(artifact, target_dir) | ||
|
||
return os.path.basename(artifact) |
Oops, something went wrong.