Skip to content

Commit dd114a4

Browse files
committed
Auto merge of #1831 - alexcrichton:publish-cargo, r=huonw
This commit tweaks some metadata here and there to publish Cargo on crates.io. * License fields are added to Cargo.tomls * `registry` was renamed to `crates-io` * API docs for the `cargo` crate are now generated via `make doc`
2 parents fec382d + a4c5438 commit dd114a4

File tree

7 files changed

+55
-27
lines changed

7 files changed

+55
-27
lines changed

Cargo.lock

Lines changed: 23 additions & 11 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,13 @@ version = "0.4.0"
44
authors = ["Yehuda Katz <[email protected]>",
55
"Carl Lerche <[email protected]>",
66
"Alex Crichton <[email protected]>"]
7+
license = "MIT/Apache-2.0"
8+
homepage = "https://crates.io"
9+
repository = "https://github.com/rust-lang/cargo"
10+
documentation = "http://doc.crates.io"
11+
description = """
12+
Cargo, a package manager for Rust.
13+
"""
714

815
[lib]
916
name = "cargo"
@@ -25,7 +32,7 @@ libgit2-sys = "0.2"
2532
log = "0.3"
2633
num_cpus = "0.2"
2734
regex = "0.1"
28-
registry = { path = "src/registry" }
35+
crates-io = { path = "src/crates-io", version = "0.1" }
2936
rustc-serialize = "0.3"
3037
semver = "0.1"
3138
tar = { version = "0.2", features = ["nightly"] }
@@ -38,7 +45,7 @@ winapi = "0.2"
3845

3946
[dev-dependencies]
4047
tempdir = "0.3"
41-
hamcrest = { git = "https://github.com/carllerche/hamcrest-rust.git" }
48+
hamcrest = "0.1"
4249
bufstream = "0.1"
4350
filetime = "0.1"
4451

Makefile.in

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,11 @@ ASSETS := CNAME images/noise.png images/forkme.png images/Cargo-Logo-Small.png \
133133
images/search.png
134134

135135
doc: $(foreach doc,$(DOCS),target/doc/$(doc).html) \
136-
$(foreach asset,$(ASSETS),target/doc/$(asset))
136+
$(foreach asset,$(ASSETS),target/doc/$(asset)) \
137+
target/doc/cargo/index.html
138+
139+
target/doc/cargo/index.html:
140+
$(CARGO) doc --no-deps
137141

138142
$(DOC_DIR)/%.html: src/doc/%.md src/doc/header.html src/doc/footer.html
139143
@mkdir -p $(@D)

src/cargo/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33

44
#[cfg(test)] extern crate hamcrest;
55
#[macro_use] extern crate log;
6+
extern crate crates_io as registry;
67
extern crate curl;
78
extern crate docopt;
89
extern crate filetime;
@@ -13,7 +14,6 @@ extern crate libc;
1314
extern crate libgit2_sys;
1415
extern crate num_cpus;
1516
extern crate regex;
16-
extern crate registry;
1717
extern crate rustc_serialize;
1818
extern crate semver;
1919
extern crate tar;

src/crates-io/Cargo.toml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
[package]
2+
name = "crates-io"
3+
version = "0.1.0"
4+
authors = ["Alex Crichton <[email protected]>"]
5+
license = "MIT/Apache-2.0"
6+
repository = "https://github.com/rust-lang/cargo"
7+
description = """
8+
Helpers for interacting with crates.io
9+
"""
10+
11+
[lib]
12+
name = "crates_io"
13+
path = "lib.rs"
14+
15+
[dependencies]
16+
curl = "0.2"
17+
rustc-serialize = "0.3"
File renamed without changes.

src/registry/Cargo.toml

Lines changed: 0 additions & 12 deletions
This file was deleted.

0 commit comments

Comments
 (0)