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

Fix missing Apache-2.0 license file in the published crate #416

Merged
merged 1 commit into from
Jan 18, 2024

Conversation

musicinmybrain
Copy link
Contributor

Add a symbolic link to the top-level LICENSE file.

What does this PR do?

The Apache 2.0 license says in section 4(a): “You must give any other recipients of the Work or Derivative Works a copy of this License”

However, prior to this PR, the published crate does not contain the license text:

$ tar -tzvf safetensors-0.4.1.crate
-rw-r--r-- 0/0             105 1969-12-31 19:00 safetensors-0.4.1/.cargo_vcs_info.json
-rw-r--r-- 0/0            1528 1969-12-31 19:00 safetensors-0.4.1/Cargo.toml
-rw-r--r-- 0/0            1040 2006-07-23 21:21 safetensors-0.4.1/Cargo.toml.orig
-rw-r--r-- 0/0           10566 2006-07-23 21:21 safetensors-0.4.1/README.md
-rw-r--r-- 0/0            1701 2006-07-23 21:21 safetensors-0.4.1/benches/benchmark.rs
-rw-r--r-- 0/0             184 2006-07-23 21:21 safetensors-0.4.1/src/lib.rs
-rw-r--r-- 0/0           16641 2006-07-23 21:21 safetensors-0.4.1/src/slice.rs
-rw-r--r-- 0/0           41672 2006-07-23 21:21 safetensors-0.4.1/src/tensor.rs

This PR adds a symbolic link in the safetensors/ directory to the top-level LICENSE file. This is derefenced by cargo publish, and after the PR, a copy of the top-level LICENSE is include in the crate as a normal file, satisfying the distribution requirements of the license.

$ cargo publish --dry-run
[…]
$ tar -tzvf ./target/package/safetensors-0.4.2-dev.0.crate
-rw-r--r-- 0/0             105 1969-12-31 19:00 safetensors-0.4.2-dev.0/.cargo_vcs_info.json
-rw-r--r-- 0/0            1534 1969-12-31 19:00 safetensors-0.4.2-dev.0/Cargo.toml
-rw-r--r-- 0/0            1046 2006-07-23 21:21 safetensors-0.4.2-dev.0/Cargo.toml.orig
-rw-r--r-- 0/0           11357 2006-07-23 21:21 safetensors-0.4.2-dev.0/LICENSE
-rw-r--r-- 0/0           10566 2006-07-23 21:21 safetensors-0.4.2-dev.0/README.md
-rw-r--r-- 0/0            1701 2006-07-23 21:21 safetensors-0.4.2-dev.0/benches/benchmark.rs
-rw-r--r-- 0/0             184 2006-07-23 21:21 safetensors-0.4.2-dev.0/src/lib.rs
-rw-r--r-- 0/0           16641 2006-07-23 21:21 safetensors-0.4.2-dev.0/src/slice.rs
-rw-r--r-- 0/0           41672 2006-07-23 21:21 safetensors-0.4.2-dev.0/src/tensor.rs

Add a symbolic link to the top-level LICENSE file.
@Narsil
Copy link
Collaborator

Narsil commented Jan 18, 2024

Thank you for this

@Narsil Narsil merged commit 1a40a2d into huggingface:main Jan 18, 2024
3 of 10 checks passed
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

Successfully merging this pull request may close these issues.

2 participants