hijri-datetime 0.1.0__tar.gz → 0.2.3.post0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- hijri_datetime-0.2.3.post0/.github/workflows/release.yml +45 -0
- hijri_datetime-0.2.3.post0/.gitignore +207 -0
- hijri_datetime-0.2.3.post0/CHANGELOG.md +0 -0
- hijri_datetime-0.2.3.post0/LICENSE +0 -0
- hijri_datetime-0.2.3.post0/MANIFEST.in +8 -0
- {hijri_datetime-0.1.0 → hijri_datetime-0.2.3.post0}/PKG-INFO +77 -9
- {hijri_datetime-0.1.0 → hijri_datetime-0.2.3.post0}/README.md +7 -1
- hijri_datetime-0.2.3.post0/clean_build_dirs.py +76 -0
- hijri_datetime-0.2.3.post0/pyproject.toml +230 -0
- hijri_datetime-0.2.3.post0/src/hijri_datetime/__init__.py +97 -0
- hijri_datetime-0.2.3.post0/src/hijri_datetime/_version.py +34 -0
- hijri_datetime-0.2.3.post0/src/hijri_datetime/calendar.py +0 -0
- hijri_datetime-0.2.3.post0/src/hijri_datetime/constants.py +64 -0
- hijri_datetime-0.2.3.post0/src/hijri_datetime/conversion.py +0 -0
- hijri_datetime-0.2.3.post0/src/hijri_datetime/date.py +135 -0
- hijri_datetime-0.2.3.post0/src/hijri_datetime/datetime.py +0 -0
- hijri_datetime-0.2.3.post0/src/hijri_datetime/exceptions.py +26 -0
- hijri_datetime-0.2.3.post0/src/hijri_datetime/range.py +0 -0
- hijri_datetime-0.2.3.post0/src/hijri_datetime/time.py +0 -0
- hijri_datetime-0.2.3.post0/src/hijri_datetime/utils.py +0 -0
- {hijri_datetime-0.1.0 → hijri_datetime-0.2.3.post0}/src/hijri_datetime.egg-info/PKG-INFO +77 -9
- hijri_datetime-0.2.3.post0/src/hijri_datetime.egg-info/SOURCES.txt +26 -0
- hijri_datetime-0.2.3.post0/src/hijri_datetime.egg-info/requires.txt +55 -0
- hijri_datetime-0.2.3.post0/tests/conftest.py +23 -0
- hijri_datetime-0.1.0/pyproject.toml +0 -42
- hijri_datetime-0.1.0/src/hijri_datetime/__init__.py +0 -3
- hijri_datetime-0.1.0/src/hijri_datetime.egg-info/SOURCES.txt +0 -9
- hijri_datetime-0.1.0/tests/test_hello.py +0 -4
- {hijri_datetime-0.1.0 → hijri_datetime-0.2.3.post0}/setup.cfg +0 -0
- {hijri_datetime-0.1.0 → hijri_datetime-0.2.3.post0}/src/hijri_datetime/hello.py +0 -0
- {hijri_datetime-0.1.0 → hijri_datetime-0.2.3.post0}/src/hijri_datetime.egg-info/dependency_links.txt +0 -0
- {hijri_datetime-0.1.0 → hijri_datetime-0.2.3.post0}/src/hijri_datetime.egg-info/top_level.txt +0 -0
@@ -0,0 +1,45 @@
|
|
1
|
+
name: Release
|
2
|
+
|
3
|
+
on:
|
4
|
+
push:
|
5
|
+
tags:
|
6
|
+
- 'v*.*.*' # Matches tags like v1.2.3
|
7
|
+
|
8
|
+
jobs:
|
9
|
+
release:
|
10
|
+
name: Build and Release
|
11
|
+
runs-on: ubuntu-latest
|
12
|
+
|
13
|
+
steps:
|
14
|
+
- name: Checkout code
|
15
|
+
uses: actions/checkout@v4
|
16
|
+
|
17
|
+
- name: Set up Python
|
18
|
+
uses: actions/setup-python@v5
|
19
|
+
with:
|
20
|
+
python-version: '3.10'
|
21
|
+
|
22
|
+
- name: Install dependencies
|
23
|
+
run: |
|
24
|
+
python -m pip install --upgrade pip
|
25
|
+
pip install setuptools wheel twine
|
26
|
+
|
27
|
+
- run: python -m build
|
28
|
+
|
29
|
+
- name: Publish to PyPI
|
30
|
+
uses: pypa/gh-action-pypi-publish@release/v1
|
31
|
+
with:
|
32
|
+
user: m_lotfi
|
33
|
+
password: ${{ secrets.PYPI_API_TOKEN }}
|
34
|
+
|
35
|
+
- name: Build package
|
36
|
+
run: |
|
37
|
+
python setup.py sdist bdist_wheel
|
38
|
+
|
39
|
+
- name: Create GitHub Release
|
40
|
+
uses: softprops/action-gh-release@v2
|
41
|
+
with:
|
42
|
+
generate_release_notes: true
|
43
|
+
env:
|
44
|
+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
45
|
+
|
@@ -0,0 +1,207 @@
|
|
1
|
+
# Byte-compiled / optimized / DLL files
|
2
|
+
__pycache__/
|
3
|
+
*.py[codz]
|
4
|
+
*$py.class
|
5
|
+
|
6
|
+
# C extensions
|
7
|
+
*.so
|
8
|
+
|
9
|
+
# Distribution / packaging
|
10
|
+
.Python
|
11
|
+
build/
|
12
|
+
develop-eggs/
|
13
|
+
dist/
|
14
|
+
downloads/
|
15
|
+
eggs/
|
16
|
+
.eggs/
|
17
|
+
lib/
|
18
|
+
lib64/
|
19
|
+
parts/
|
20
|
+
sdist/
|
21
|
+
var/
|
22
|
+
wheels/
|
23
|
+
share/python-wheels/
|
24
|
+
*.egg-info/
|
25
|
+
.installed.cfg
|
26
|
+
*.egg
|
27
|
+
MANIFEST
|
28
|
+
|
29
|
+
# PyInstaller
|
30
|
+
# Usually these files are written by a python script from a template
|
31
|
+
# before PyInstaller builds the exe, so as to inject date/other infos into it.
|
32
|
+
*.manifest
|
33
|
+
*.spec
|
34
|
+
|
35
|
+
# Installer logs
|
36
|
+
pip-log.txt
|
37
|
+
pip-delete-this-directory.txt
|
38
|
+
|
39
|
+
# Unit test / coverage reports
|
40
|
+
htmlcov/
|
41
|
+
.tox/
|
42
|
+
.nox/
|
43
|
+
.coverage
|
44
|
+
.coverage.*
|
45
|
+
.cache
|
46
|
+
nosetests.xml
|
47
|
+
coverage.xml
|
48
|
+
*.cover
|
49
|
+
*.py.cover
|
50
|
+
.hypothesis/
|
51
|
+
.pytest_cache/
|
52
|
+
cover/
|
53
|
+
|
54
|
+
# Translations
|
55
|
+
*.mo
|
56
|
+
*.pot
|
57
|
+
|
58
|
+
# Django stuff:
|
59
|
+
*.log
|
60
|
+
local_settings.py
|
61
|
+
db.sqlite3
|
62
|
+
db.sqlite3-journal
|
63
|
+
|
64
|
+
# Flask stuff:
|
65
|
+
instance/
|
66
|
+
.webassets-cache
|
67
|
+
|
68
|
+
# Scrapy stuff:
|
69
|
+
.scrapy
|
70
|
+
|
71
|
+
# Sphinx documentation
|
72
|
+
docs/_build/
|
73
|
+
|
74
|
+
# PyBuilder
|
75
|
+
.pybuilder/
|
76
|
+
target/
|
77
|
+
|
78
|
+
# Jupyter Notebook
|
79
|
+
.ipynb_checkpoints
|
80
|
+
|
81
|
+
# IPython
|
82
|
+
profile_default/
|
83
|
+
ipython_config.py
|
84
|
+
|
85
|
+
# pyenv
|
86
|
+
# For a library or package, you might want to ignore these files since the code is
|
87
|
+
# intended to run in multiple environments; otherwise, check them in:
|
88
|
+
# .python-version
|
89
|
+
|
90
|
+
# pipenv
|
91
|
+
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
|
92
|
+
# However, in case of collaboration, if having platform-specific dependencies or dependencies
|
93
|
+
# having no cross-platform support, pipenv may install dependencies that don't work, or not
|
94
|
+
# install all needed dependencies.
|
95
|
+
#Pipfile.lock
|
96
|
+
|
97
|
+
# UV
|
98
|
+
# Similar to Pipfile.lock, it is generally recommended to include uv.lock in version control.
|
99
|
+
# This is especially recommended for binary packages to ensure reproducibility, and is more
|
100
|
+
# commonly ignored for libraries.
|
101
|
+
#uv.lock
|
102
|
+
|
103
|
+
# poetry
|
104
|
+
# Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
|
105
|
+
# This is especially recommended for binary packages to ensure reproducibility, and is more
|
106
|
+
# commonly ignored for libraries.
|
107
|
+
# https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
|
108
|
+
#poetry.lock
|
109
|
+
#poetry.toml
|
110
|
+
|
111
|
+
# pdm
|
112
|
+
# Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
|
113
|
+
# pdm recommends including project-wide configuration in pdm.toml, but excluding .pdm-python.
|
114
|
+
# https://pdm-project.org/en/latest/usage/project/#working-with-version-control
|
115
|
+
#pdm.lock
|
116
|
+
#pdm.toml
|
117
|
+
.pdm-python
|
118
|
+
.pdm-build/
|
119
|
+
|
120
|
+
# pixi
|
121
|
+
# Similar to Pipfile.lock, it is generally recommended to include pixi.lock in version control.
|
122
|
+
#pixi.lock
|
123
|
+
# Pixi creates a virtual environment in the .pixi directory, just like venv module creates one
|
124
|
+
# in the .venv directory. It is recommended not to include this directory in version control.
|
125
|
+
.pixi
|
126
|
+
|
127
|
+
# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
|
128
|
+
__pypackages__/
|
129
|
+
|
130
|
+
# Celery stuff
|
131
|
+
celerybeat-schedule
|
132
|
+
celerybeat.pid
|
133
|
+
|
134
|
+
# SageMath parsed files
|
135
|
+
*.sage.py
|
136
|
+
|
137
|
+
# Environments
|
138
|
+
.env
|
139
|
+
.envrc
|
140
|
+
.venv
|
141
|
+
env/
|
142
|
+
venv/
|
143
|
+
ENV/
|
144
|
+
env.bak/
|
145
|
+
venv.bak/
|
146
|
+
|
147
|
+
# Spyder project settings
|
148
|
+
.spyderproject
|
149
|
+
.spyproject
|
150
|
+
|
151
|
+
# Rope project settings
|
152
|
+
.ropeproject
|
153
|
+
|
154
|
+
# mkdocs documentation
|
155
|
+
/site
|
156
|
+
|
157
|
+
# mypy
|
158
|
+
.mypy_cache/
|
159
|
+
.dmypy.json
|
160
|
+
dmypy.json
|
161
|
+
|
162
|
+
# Pyre type checker
|
163
|
+
.pyre/
|
164
|
+
|
165
|
+
# pytype static type analyzer
|
166
|
+
.pytype/
|
167
|
+
|
168
|
+
# Cython debug symbols
|
169
|
+
cython_debug/
|
170
|
+
|
171
|
+
# PyCharm
|
172
|
+
# JetBrains specific template is maintained in a separate JetBrains.gitignore that can
|
173
|
+
# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
|
174
|
+
# and can be added to the global gitignore or merged into this file. For a more nuclear
|
175
|
+
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
|
176
|
+
#.idea/
|
177
|
+
|
178
|
+
# Abstra
|
179
|
+
# Abstra is an AI-powered process automation framework.
|
180
|
+
# Ignore directories containing user credentials, local state, and settings.
|
181
|
+
# Learn more at https://abstra.io/docs
|
182
|
+
.abstra/
|
183
|
+
|
184
|
+
# Visual Studio Code
|
185
|
+
# Visual Studio Code specific template is maintained in a separate VisualStudioCode.gitignore
|
186
|
+
# that can be found at https://github.com/github/gitignore/blob/main/Global/VisualStudioCode.gitignore
|
187
|
+
# and can be added to the global gitignore or merged into this file. However, if you prefer,
|
188
|
+
# you could uncomment the following to ignore the entire vscode folder
|
189
|
+
# .vscode/
|
190
|
+
|
191
|
+
# Ruff stuff:
|
192
|
+
.ruff_cache/
|
193
|
+
|
194
|
+
# PyPI configuration file
|
195
|
+
.pypirc
|
196
|
+
|
197
|
+
# Cursor
|
198
|
+
# Cursor is an AI-powered code editor. `.cursorignore` specifies files/directories to
|
199
|
+
# exclude from AI features like autocomplete and code analysis. Recommended for sensitive data
|
200
|
+
# refer to https://docs.cursor.com/context/ignore-files
|
201
|
+
.cursorignore
|
202
|
+
.cursorindexingignore
|
203
|
+
|
204
|
+
# Marimo
|
205
|
+
marimo/_static/
|
206
|
+
marimo/_lsp/
|
207
|
+
__marimo__/
|
File without changes
|
File without changes
|
@@ -1,13 +1,23 @@
|
|
1
|
-
Metadata-Version: 2.
|
1
|
+
Metadata-Version: 2.1
|
2
2
|
Name: hijri-datetime
|
3
|
-
Version: 0.
|
3
|
+
Version: 0.2.3.post0
|
4
|
+
Summary: Pythonic Hijri datetime — handle full & partial dates, ranges, and seamless Gregorian & Jalali conversion.
|
4
5
|
Author-email: "m.lotfi" <m.lotfi@email.com>
|
5
6
|
Maintainer-email: "m.lotfi" <m.lotfi@email.com>
|
6
|
-
License:
|
7
|
-
|
8
|
-
|
9
|
-
|
7
|
+
License: GPL version 3
|
8
|
+
Project-URL: Homepage, https://github.com/mlotfic/hijri-datetime
|
9
|
+
Project-URL: Documentation, https://github.com/mlotfic/hijri-datetime#readme
|
10
|
+
Project-URL: Repository, https://github.com/mlotfic/hijri-datetime.git
|
11
|
+
Project-URL: Bug Tracker, https://github.com/mlotfic/hijri-datetime/issues
|
12
|
+
Project-URL: Changelog, https://github.com/mlotfic/hijri-datetime/blob/main/CHANGELOG.md
|
13
|
+
Project-URL: Source Code, https://github.com/mlotfic/hijri-datetime
|
14
|
+
Project-URL: Download, https://pypi.org/project/hijri-datetime/
|
15
|
+
Keywords: python,package,modules,portable,hijri,islamic,calendar,datetime,gregorian,jalali,conversion
|
16
|
+
Classifier: Development Status :: 4 - Beta
|
17
|
+
Classifier: License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)
|
10
18
|
Classifier: Intended Audience :: Developers
|
19
|
+
Classifier: Topic :: Software Development :: Libraries
|
20
|
+
Classifier: Topic :: Software Development :: Libraries :: Python Modules
|
11
21
|
Classifier: Programming Language :: Python :: 3
|
12
22
|
Classifier: Programming Language :: Python :: 3.8
|
13
23
|
Classifier: Programming Language :: Python :: 3.9
|
@@ -15,13 +25,67 @@ Classifier: Programming Language :: Python :: 3.10
|
|
15
25
|
Classifier: Programming Language :: Python :: 3.11
|
16
26
|
Classifier: Programming Language :: Python :: 3.12
|
17
27
|
Classifier: Operating System :: OS Independent
|
18
|
-
Classifier: Topic ::
|
19
|
-
Classifier: Topic :: Software Development ::
|
28
|
+
Classifier: Topic :: Scientific/Engineering :: Information Analysis
|
29
|
+
Classifier: Topic :: Software Development :: Internationalization
|
30
|
+
Classifier: Topic :: Utilities
|
20
31
|
Requires-Python: >=3.8
|
21
32
|
Description-Content-Type: text/markdown
|
33
|
+
License-File: LICENSE
|
34
|
+
Requires-Dist: jdatetime>=3.0.0
|
35
|
+
Requires-Dist: requests>=2.20.0
|
36
|
+
Requires-Dist: numpy>=1.18.0
|
37
|
+
Requires-Dist: pandas>=1.0.0
|
38
|
+
Provides-Extra: dev
|
39
|
+
Requires-Dist: pytest>=6.0; extra == "dev"
|
40
|
+
Requires-Dist: pytest-cov>=2.0; extra == "dev"
|
41
|
+
Requires-Dist: black>=22.0; extra == "dev"
|
42
|
+
Requires-Dist: flake8>=4.0; extra == "dev"
|
43
|
+
Requires-Dist: mypy>=0.900; extra == "dev"
|
44
|
+
Requires-Dist: pre-commit>=2.0; extra == "dev"
|
45
|
+
Requires-Dist: tox>=3.0; extra == "dev"
|
46
|
+
Requires-Dist: build>=0.10; extra == "dev"
|
47
|
+
Requires-Dist: twine>=4.0; extra == "dev"
|
48
|
+
Requires-Dist: setuptools_scm>=6.2; extra == "dev"
|
49
|
+
Requires-Dist: setuptools>=45; extra == "dev"
|
50
|
+
Requires-Dist: wheel; extra == "dev"
|
51
|
+
Requires-Dist: sphinx>=4.0; extra == "dev"
|
52
|
+
Requires-Dist: sphinx-rtd-theme>=1.0; extra == "dev"
|
53
|
+
Provides-Extra: test
|
54
|
+
Requires-Dist: pytest>=6.0; extra == "test"
|
55
|
+
Requires-Dist: pytest-cov>=2.0; extra == "test"
|
56
|
+
Requires-Dist: pytest-mock>=3.0; extra == "test"
|
57
|
+
Provides-Extra: docs
|
58
|
+
Requires-Dist: sphinx>=4.0; extra == "docs"
|
59
|
+
Requires-Dist: sphinx-rtd-theme>=1.0; extra == "docs"
|
60
|
+
Requires-Dist: myst-parser>=0.17.0; extra == "docs"
|
61
|
+
Provides-Extra: lint
|
62
|
+
Requires-Dist: black>=22.0; extra == "lint"
|
63
|
+
Requires-Dist: flake8>=4.0; extra == "lint"
|
64
|
+
Requires-Dist: mypy>=0.900; extra == "lint"
|
65
|
+
Requires-Dist: isort>=5.0; extra == "lint"
|
66
|
+
Provides-Extra: all
|
67
|
+
Requires-Dist: pytest>=6.0; extra == "all"
|
68
|
+
Requires-Dist: pytest-cov>=2.0; extra == "all"
|
69
|
+
Requires-Dist: pytest-mock>=3.0; extra == "all"
|
70
|
+
Requires-Dist: black>=22.0; extra == "all"
|
71
|
+
Requires-Dist: flake8>=4.0; extra == "all"
|
72
|
+
Requires-Dist: mypy>=0.900; extra == "all"
|
73
|
+
Requires-Dist: isort>=5.0; extra == "all"
|
74
|
+
Requires-Dist: pre-commit>=2.0; extra == "all"
|
75
|
+
Requires-Dist: tox>=3.0; extra == "all"
|
76
|
+
Requires-Dist: build>=0.10; extra == "all"
|
77
|
+
Requires-Dist: twine>=4.0; extra == "all"
|
78
|
+
Requires-Dist: setuptools_scm>=6.2; extra == "all"
|
79
|
+
Requires-Dist: setuptools>=45; extra == "all"
|
80
|
+
Requires-Dist: wheel; extra == "all"
|
81
|
+
Requires-Dist: sphinx>=4.0; extra == "all"
|
82
|
+
Requires-Dist: sphinx-rtd-theme>=1.0; extra == "all"
|
83
|
+
Requires-Dist: myst-parser>=0.17.0; extra == "all"
|
22
84
|
|
23
85
|
# hijri-datetime
|
24
86
|
|
87
|
+
# 💡💡💡💡💡💡 **this not working yet** 💡💡💡💡
|
88
|
+
|
25
89
|
📅 **Hijri (Islamic) calendar datetime library for Python**
|
26
90
|
A drop-in replacement for Python's built-in `datetime` module, supporting Hijri date arithmetic, formatting, conversion, partial dates, and integration with `jdatetime`.
|
27
91
|
|
@@ -97,6 +161,10 @@ print(jd) # jdatetime.date(...)
|
|
97
161
|
|
98
162
|
## Partial Dates & Ranges
|
99
163
|
|
164
|
+
- `HijriDate(1446)` → represents the whole year.
|
165
|
+
- `HijriDate(1446, 2)` → represents all days of month 2.
|
166
|
+
- Conversion to Gregorian returns ranges:
|
167
|
+
|
100
168
|
* **Year only**
|
101
169
|
|
102
170
|
```python
|
@@ -105,7 +173,7 @@ print(jd) # jdatetime.date(...)
|
|
105
173
|
print(start, end) # 2024-07-18 2025-07-06 (example)
|
106
174
|
```
|
107
175
|
|
108
|
-
* **Month only**
|
176
|
+
* **Year and Month only**
|
109
177
|
|
110
178
|
```python
|
111
179
|
d = HijriDate(1446, 2)
|
@@ -1,5 +1,7 @@
|
|
1
1
|
# hijri-datetime
|
2
2
|
|
3
|
+
# 💡💡💡💡💡💡 **this not working yet** 💡💡💡💡
|
4
|
+
|
3
5
|
📅 **Hijri (Islamic) calendar datetime library for Python**
|
4
6
|
A drop-in replacement for Python's built-in `datetime` module, supporting Hijri date arithmetic, formatting, conversion, partial dates, and integration with `jdatetime`.
|
5
7
|
|
@@ -75,6 +77,10 @@ print(jd) # jdatetime.date(...)
|
|
75
77
|
|
76
78
|
## Partial Dates & Ranges
|
77
79
|
|
80
|
+
- `HijriDate(1446)` → represents the whole year.
|
81
|
+
- `HijriDate(1446, 2)` → represents all days of month 2.
|
82
|
+
- Conversion to Gregorian returns ranges:
|
83
|
+
|
78
84
|
* **Year only**
|
79
85
|
|
80
86
|
```python
|
@@ -83,7 +89,7 @@ print(jd) # jdatetime.date(...)
|
|
83
89
|
print(start, end) # 2024-07-18 2025-07-06 (example)
|
84
90
|
```
|
85
91
|
|
86
|
-
* **Month only**
|
92
|
+
* **Year and Month only**
|
87
93
|
|
88
94
|
```python
|
89
95
|
d = HijriDate(1446, 2)
|
@@ -0,0 +1,76 @@
|
|
1
|
+
import os
|
2
|
+
import shutil
|
3
|
+
|
4
|
+
def remove_egg_info_recursively(root="."):
|
5
|
+
"""
|
6
|
+
Recursively remove all directories ending with `.egg-info` starting from `root`.
|
7
|
+
"""
|
8
|
+
for dirpath, dirnames, _ in os.walk(root):
|
9
|
+
# Make a copy of dirnames because we may modify it while iterating
|
10
|
+
for dirname in dirnames[:]:
|
11
|
+
if dirname.endswith(".egg-info"):
|
12
|
+
full_path = os.path.join(dirpath, dirname)
|
13
|
+
print(f"Removing {full_path}/ ...")
|
14
|
+
shutil.rmtree(full_path)
|
15
|
+
# remove from dirnames so os.walk doesn't descend into it
|
16
|
+
dirnames.remove(dirname)
|
17
|
+
|
18
|
+
|
19
|
+
def clean_build_dirs():
|
20
|
+
"""
|
21
|
+
Remove build artifact directories if they exist:
|
22
|
+
- dist/
|
23
|
+
- any *.egg-info directory
|
24
|
+
"""
|
25
|
+
# Always check 'dist'
|
26
|
+
if os.path.exists("dist"):
|
27
|
+
print("Removing dist/ ...")
|
28
|
+
shutil.rmtree("dist")
|
29
|
+
else:
|
30
|
+
print("dist/ not found, skipping.")
|
31
|
+
|
32
|
+
remove_egg_info_recursively()
|
33
|
+
|
34
|
+
|
35
|
+
if __name__ == "__main__":
|
36
|
+
clean_build_dirs()
|
37
|
+
|
38
|
+
|
39
|
+
'''
|
40
|
+
# python -m build
|
41
|
+
|
42
|
+
# twine upload --repository testpypi dist/*
|
43
|
+
|
44
|
+
|
45
|
+
# Make a small commit (even just updating a comment)
|
46
|
+
git add .
|
47
|
+
git config --global --add safe.directory E:/GitHub/hijri-datetime
|
48
|
+
git add .
|
49
|
+
git commit -m "Bump version for new release"
|
50
|
+
|
51
|
+
# Rebuild - this will create a version like 0.0.1.dev1+g1234567
|
52
|
+
python -m build
|
53
|
+
|
54
|
+
git tag v0.2.0
|
55
|
+
git push origin v0.2.0
|
56
|
+
python -m build
|
57
|
+
twine upload dist/*
|
58
|
+
|
59
|
+
# 5. Install development dependencies
|
60
|
+
pip install -e ".[dev]"
|
61
|
+
|
62
|
+
# 6. Set up pre-commit hooks
|
63
|
+
pre-commit install
|
64
|
+
|
65
|
+
# 7. Run initial tests
|
66
|
+
pytest
|
67
|
+
|
68
|
+
# 8. Build the package
|
69
|
+
python -m build
|
70
|
+
|
71
|
+
# 9. Check the package
|
72
|
+
twine check dist/*
|
73
|
+
|
74
|
+
|
75
|
+
|
76
|
+
'''
|