【问题标题】:Hosting a file on github (submitting a file to PyPI)在 github 上托管文件(向 PyPI 提交文件)
【发布时间】:2016-12-30 10:30:54
【问题描述】:

我正在关注this 指南,除了文件托管之外,我已经准备好了一切。我迷路了:

download_url 是指向包含您的存储库代码的托管文件的链接。 Github 会为你托管这个,但前提是你创建了一个 git 标签。在您的存储库中,键入: git tag 0.1 -m “添加一个标签,以便我们可以将它放在 PyPI 上。”。然后,输入 git tag 以显示标签列表——您应该在列表中看到 0.1。键入 git push --tags origin master 以使用最新的标签信息更新您在 Github 上的代码。 Github 在 https://github.com/{username}/{module_name}/tarball/{tag} 创建 tarball 供下载。

我应该使用 git shell 将现有的 github 存储库克隆到我的计算机吗?

作为一个初学者,我可以说编码似乎比实际编码周围的绒毛容易 5 倍,有趣 5 倍 :((对于绒毛读取安装程序、项目框架目录等)

【问题讨论】:

  • 也许这会将它撞到有人可以看到的地方,尽管它是愚蠢的初学者问题。

标签: github pypi


【解决方案1】:
C:\Users\Dave\Desktop\distributing> git clone https://github.com/dmt257/hellodmt2.git
Cloning into 'hellodmt2'...
remote: Counting objects: 8, done.
remote: Compressing objects: 100% (6/6), done.
remote: Total 8 (delta 0), reused 0 (delta 0), pack-reused 0
Unpacking objects: 100% (8/8), done.
Checking connectivity... done.
C:\Users\Dave\Desktop\distributing> git-tag 0.1 -m "adds a tag so that we can out this on PyPI."
git-tag : The term 'git-tag' is not recognized as the name of a cmdlet, function, script file, or operable program.
Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
At line:1 char:1
+ git-tag 0.1 -m "adds a tag so that we can out this on PyPI."
+ ~~~~~~~
    + CategoryInfo          : ObjectNotFound: (git-tag:String) [], CommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException

C:\Users\Dave\Desktop\distributing> ls


    Directory: C:\Users\Dave\Desktop\distributing


Mode                LastWriteTime         Length Name
----                -------------         ------ ----
d-----       23/08/2016     07:56                helloDistribution
d-----       24/08/2016     06:26                hellodmt2
d-----       23/08/2016     14:16                hellodmt2Distribution
d-----       23/08/2016     08:02                hellodmtDistribution


C:\Users\Dave\Desktop\distributing> cd .\hellodmt2
C:\Users\Dave\Desktop\distributing\hellodmt2 [master ≡]> git tag 0.1 -m "Adds a tag so that we can put this on PyPI."
C:\Users\Dave\Desktop\distributing\hellodmt2 [master ≡]> git tag
0.1
C:\Users\Dave\Desktop\distributing\hellodmt2 [master ≡]> git push --tags origin master
Counting objects: 1, done.
Writing objects: 100% (1/1), 180 bytes | 0 bytes/s, done.
Total 1 (delta 0), reused 0 (delta 0)
To https://github.com/dmt257/hellodmt2.git
 * [new tag]         0.1 -> 0.1
C:\Users\Dave\Desktop\distributing\hellodmt2 [master ≡]>

链接似乎是这种格式(在 github 帐户中的发布选项下),而不是指南中显示的:

https://github.com/dmt257/hellodmt2/archive/0.1.tar.gz

【讨论】:

    猜你喜欢
    • 2012-12-11
    • 2011-04-25
    • 2015-05-25
    • 2016-02-11
    • 2016-11-03
    • 2016-03-22
    • 1970-01-01
    • 2015-06-24
    • 1970-01-01
    相关资源
    最近更新 更多