Skip to content

Commit 010e1fd

Browse files
Move necessary py files into their own package
1 parent d7b7989 commit 010e1fd

File tree

4 files changed

+23
-3
lines changed

4 files changed

+23
-3
lines changed

pyproject.toml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ requires = ["setuptools"]
33
build-backend = "setuptools.build_meta"
44

55
[project]
6-
name="sparkfun_opt4048_tristimulus_color_sensor"
6+
name = "sparkfun_opt4048_tristimulus_color_sensor"
77
version="1.0.0"
88
description="SparkFun Electronics Tristiumulus Color Sensor - OPT4048"
99
url="https://www.sparkfun.com/products/22638"
@@ -33,4 +33,5 @@ classifiers=[
3333
keywords=["electronics", "maker", "sensing"]
3434

3535
[tool.setuptools]
36-
py-modules=["qwiic_opt4048", "opt4048_registers"]
36+
# py-modules=["qwiic_opt4048", "opt4048_registers"] # Circup gets upset if there are multiple modules...
37+
packages = ["qwiic_opt4048"]

qwiic_opt4048/__init__.py

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# -------------------------------------------------------------------------------
2+
# qwiic_opt4048
3+
#
4+
# Do you like this library? Help support SparkFun. Buy a board!
5+
# * Qwiic 1x1: https://www.sparkfun.com/products/22638
6+
# * Qwiic Mini: https://www.sparkfun.com/products/22639
7+
8+
# Python library for the SparkFun Qwiic OPT4048 Tristiumulus Color Sensor, available here:
9+
# * https://www.github.com/SparkFun/Qwiic_OPT4048_Py
10+
# -------------------------------------------------------------------------------
11+
# Written by SparkFun Electronics, November, 2023 This python library supports the SparkFun Electroncis Qwiic ecosystem
12+
# More information on Qwiic is at https://www.sparkfun.com/qwiic
13+
#
14+
# ===============================================================================
15+
# Copyright (c) 2023 SparkFun Electronics
16+
# SPDX-License-Identifier: MIT
17+
# ===============================================================================
18+
19+
from .qwiic_opt4048 import QwOpt4048
File renamed without changes.

qwiic_opt4048.py renamed to qwiic_opt4048/qwiic_opt4048.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818

1919
from dataclasses import dataclass
2020
import qwiic_i2c
21-
import opt4048_registers as REGS
21+
import qwiic_opt4048.opt4048_registers as REGS
2222

2323
OPT4048_ADDR_HIGH = 0x45
2424
OPT4048_ADDR_SCL = 0x45

0 commit comments

Comments
 (0)