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

Cannot use ScanCode.io fully as a library #1608

Open
pombredanne opened this issue Feb 27, 2025 · 3 comments
Open

Cannot use ScanCode.io fully as a library #1608

pombredanne opened this issue Feb 27, 2025 · 3 comments

Comments

@pombredanne
Copy link
Member

In a few places, scancodeio settings are used instead of django.conf. In MatchCode, this makes this super hard as the scancode.io settings will be imported even if not desired.

Related issue:

@pombredanne
Copy link
Member Author

Actually, scancodeio/ should NOT be part of the library and wheel at all

graft scancodeio

@pombredanne
Copy link
Member Author

Actually, scancodeio/ should NOT be part of the library and wheel at all
but ScanCode.io proper should have it part as part of its wheels.
Therefore, I think we need a separate package, like we did with the pipeline, something like a scancodeio-toolkit-pyproject.toml or a scanpipe-pyproject.toml:

[build-system]
requires = ["flot"]
build-backend = "flot.buildapi"

[project]
name = "scanpipe"
version = "0.2.1" <== use same version as main SCIO
description = "ScanCode.io Scanpipe library."
license = { text = "Apache-2.0" }
readme = "README.rst"
requires-python = ">=3.9"
authors = [ { name = "nexB. Inc. and others", email = "info@aboutcode.org" } ]
keywords = [
    "open source",
    "pipeline",
    "scancode",
]

***********ADD DEPENDENCIES************

classifiers = [
    "Development Status :: 4 - Beta",
    "Intended Audience :: Developers",
    "Programming Language :: Python :: 3",
    "Programming Language :: Python :: 3 :: Only",
    "Programming Language :: Python :: 3.9",
    "Programming Language :: Python :: 3.10",
    "Programming Language :: Python :: 3.11",
    "Programming Language :: Python :: 3.12",
    "Topic :: Software Development",
    "Topic :: Utilities",
]

[project.urls]
Homepage = "https://github.com/aboutcode-org/scancode.io"
Documentation = "https://scancodeio.readthedocs.io/"
Changelog = "https://github.com/aboutcode-org/scancode.io/tree/main/CHANGELOG.rst"
Repository = "https://github.com/aboutcode-org/scancode.io/tree/main/scanpipe"
Issues = "https://github.com/aboutcode-org/scancode.io/issues"

[tool.flot]
includes = [
    "scanpipe/*",
    "scanpipe/*",
]
metadata_files = [
    "LICENSE",
    "NOTICE",
    "README.rst",
]

and we should also automate the releasing and add some smoke tests to make sure the library is functional

@tdruez
Copy link
Contributor

tdruez commented Feb 27, 2025

@pombredanne Problematic imports fixed in #1609

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants