Skip to content
This repository has been archived by the owner on Mar 14, 2024. It is now read-only.

Commit

Permalink
Other fixes to packaging
Browse files Browse the repository at this point in the history
Summary:
Basically make sure that license information is properly preserved in metadata, source and built distributions.

Also, start having a .gitignore with common stuff.

Reviewed By: adamlerer

Differential Revision: D15166521

fbshipit-source-id: 3b64e208829f3983fc2ad589c6608b584e6b40ac
  • Loading branch information
lw authored and facebook-github-bot committed May 1, 2019
1 parent 01fc3bd commit 8a3cff8
Show file tree
Hide file tree
Showing 8 changed files with 26 additions and 2 deletions.
9 changes: 9 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
*~
build/
data/
dist/
model/
*.pyc
**/__pycache__/
torchbiggraph.egg-info/
venv/
File renamed without changes.
1 change: 1 addition & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
global-include LICENSE*
4 changes: 3 additions & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# Include license in the wheel distribution.
[metadata]
license_files = LICENSE
license_files =
LICENSE
torchbiggraph/examples/LICENSE
9 changes: 8 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,12 @@
with open("requirements.txt", "rt") as f:
requirements = f.readlines()

with open("torchbiggraph/VERSION.txt", "rt") as f:
version = f.read().strip()

setup(
name="torchbiggraph",
version="1.dev",
version=version,
description="A distributed system to learn embeddings of large graphs",
long_description=long_description,
long_description_content_type="text/markdown",
Expand All @@ -36,8 +39,12 @@
"Topic :: Scientific/Engineering :: Artificial Intelligence",
],
keywords="machine-learning knowledge-base graph-embedding link-prediction",
license="BSD License",
packages=find_packages(exclude=["docs", "test"]),
package_data={
"torchbiggraph": [
"VERSION.txt",
],
"torchbiggraph.examples": [
"configs/*.py",
],
Expand Down
1 change: 1 addition & 0 deletions torchbiggraph/VERSION.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
1.dev1
4 changes: 4 additions & 0 deletions torchbiggraph/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1,5 @@
#!/usr/bin/env python3

import pkg_resources

__version__ = pkg_resources.resource_string("torchbiggraph", "VERSION.txt").decode("utf-8").strip()
File renamed without changes.

0 comments on commit 8a3cff8

Please sign in to comment.