Skip to content

Commit

Permalink
fix: output a sane pypi package that goes into "blip" folder
Browse files Browse the repository at this point in the history
 - I think the main problem stemmed from the files not being in a subfolder with the module name.
  • Loading branch information
justindujardin committed Dec 24, 2022
1 parent 21a50f1 commit 236d8bd
Show file tree
Hide file tree
Showing 36 changed files with 72 additions and 22 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
.env/
19 changes: 19 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": "Python: build",
"type": "python",
"request": "launch",
"program": "setup.py",
"justMyCode": true,
"args": [
"sdist",
"bdist_wheel"
]
}
]
}
6 changes: 4 additions & 2 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
include configs/*.json
include requirements.txt
include blip/configs/*.*
requirements.txt
requirements-dev.txt
README.md
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Empty file added blip/models/__init__.py
Empty file.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
1 change: 1 addition & 0 deletions requirements-dev.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
pytest
67 changes: 47 additions & 20 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,22 +1,49 @@
import os

import pkg_resources
from pathlib import Path
from setuptools import setup, find_packages

setup(
name="blip",
py_modules=["blip"],
version="1.0",
description="",
author="salesforce",
packages=find_packages(exclude=["tests*"]),
install_requires=[
str(r)
for r in pkg_resources.parse_requirements(
open(os.path.join(os.path.dirname(__file__), "requirements.txt"))
)
],
include_package_data=True,
package_data={"blip": ["configs/*.json", "*.json"]},
extras_require={'dev': ['pytest']},
)

def setup_package():

package_name = "blip"
root = Path(__file__).parent.resolve()
print("roo", root)

with open(root / "README.md", "r") as fh:
long_description = fh.read()

with open(root / "requirements.txt") as file:
REQUIRED_MODULES = [line.strip() for line in file]

with open(root / "requirements-dev.txt") as file:
DEVELOPMENT_MODULES = [line.strip()
for line in file if "-e" not in line]

extras = {"dev": DEVELOPMENT_MODULES}
extras["all"] = [item for group in extras.values() for item in group]

setup(
name=package_name,
description="",
author="salesforce",
author_email="",
url="",
version="",
license="",
long_description=long_description,
long_description_content_type="text/markdown",
install_requires=REQUIRED_MODULES,
packages=find_packages(),
extras_require=extras,
classifiers=[
"Programming Language :: Python :: 3",
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
"Development Status :: 2 - Pre-Alpha",
],
python_requires=">=3.6",
include_package_data=True,
)


if __name__ == "__main__":
setup_package()

0 comments on commit 236d8bd

Please sign in to comment.