File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -34,14 +34,12 @@ dev = [
3434]
3535
3636[tool .setuptools ]
37- # XXX: As of v80, setuptools does not support including top-level .pyi and py.typed
38- include-package-data = true
37+ package-dir = {"" = " src" }
3938
4039# TODO: Migrate to [tool.setuptools.ext-modules], when setuptools start supporting ABI3 builds
4140
4241[tool .setuptools .packages .find ]
43- include = [" sonyflake_turbo" ]
44- namespaces = false
42+ where = [" src" ]
4543
4644[tool .pytest .ini_options ]
4745minversion = " 7.0"
Original file line number Diff line number Diff line change 1616 options = options ,
1717 ext_modules = [
1818 Extension (
19- "sonyflake_turbo" ,
20- sources = ["sonyflake_turbo.c" ],
19+ "sonyflake_turbo._sonyflake " ,
20+ sources = ["src/ sonyflake_turbo/_sonyflake .c" ],
2121 define_macros = define_macros ,
2222 py_limited_api = py_limited_api ,
2323 ),
Original file line number Diff line number Diff line change 1+ from ._sonyflake import (
2+ SONYFLAKE_EPOCH ,
3+ SONYFLAKE_MACHINE_ID_BITS ,
4+ SONYFLAKE_MACHINE_ID_MAX ,
5+ SONYFLAKE_MACHINE_ID_OFFSET ,
6+ SONYFLAKE_SEQUENCE_BITS ,
7+ SONYFLAKE_SEQUENCE_MAX ,
8+ SONYFLAKE_TIME_OFFSET ,
9+ MachineIDLCG ,
10+ SonyFlake ,
11+ )
12+
13+ __all__ = [
14+ "SONYFLAKE_EPOCH" ,
15+ "SONYFLAKE_MACHINE_ID_BITS" ,
16+ "SONYFLAKE_MACHINE_ID_MAX" ,
17+ "SONYFLAKE_MACHINE_ID_OFFSET" ,
18+ "SONYFLAKE_SEQUENCE_BITS" ,
19+ "SONYFLAKE_SEQUENCE_MAX" ,
20+ "SONYFLAKE_TIME_OFFSET" ,
21+ "MachineIDLCG" ,
22+ "SonyFlake" ,
23+ ]
Original file line number Diff line number Diff line change @@ -446,7 +446,7 @@ static PyType_Spec machine_id_lcg_spec = {
446446};
447447
448448PyMODINIT_FUNC
449- PyInit_sonyflake_turbo (void )
449+ PyInit__sonyflake (void )
450450{
451451 PyObject * sonyflake_cls , * machine_id_lcg_cls ;
452452 PyObject * module = PyModule_Create (& sonyflake_module );
File renamed without changes.
File renamed without changes.
You can’t perform that action at this time.
0 commit comments