| 
									
										
										
										
											2019-09-13 12:18:06 +00:00
										 |  |  | #
 | 
					
						
							|  |  |  | # spec file for package python-convertdate
 | 
					
						
							|  |  |  | #
 | 
					
						
							| 
									
										
										
										
											2025-06-25 12:06:29 +00:00
										 |  |  | # Copyright (c) 2025 SUSE LLC
 | 
					
						
							| 
									
										
										
										
											2019-09-13 12:18:06 +00:00
										 |  |  | #
 | 
					
						
							|  |  |  | # All modifications and additions to the file contributed by third parties
 | 
					
						
							|  |  |  | # remain the property of their copyright owners, unless otherwise agreed
 | 
					
						
							|  |  |  | # upon. The license for this file, and modifications and additions to the
 | 
					
						
							|  |  |  | # file, is the same license as for the pristine package itself (unless the
 | 
					
						
							|  |  |  | # license for the pristine package is not an Open Source License, in which
 | 
					
						
							|  |  |  | # case the license is the MIT License). An "Open Source License" is a
 | 
					
						
							|  |  |  | # license that conforms to the Open Source Definition (Version 1.9)
 | 
					
						
							|  |  |  | # published by the Open Source Initiative.
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | # Please submit bugfixes or comments via https://bugs.opensuse.org/
 | 
					
						
							|  |  |  | #
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2025-08-12 08:17:55 +00:00
										 |  |  | %if 0%{?suse_version} > 1500
 | 
					
						
							| 
									
										
										
										
											2025-06-25 12:06:29 +00:00
										 |  |  | %bcond_without libalternatives
 | 
					
						
							| 
									
										
										
										
											2025-08-12 08:17:55 +00:00
										 |  |  | %else
 | 
					
						
							|  |  |  | %bcond_with libalternatives
 | 
					
						
							|  |  |  | %endif
 | 
					
						
							| 
									
										
										
										
											2023-04-21 14:47:46 +00:00
										 |  |  | %{?sle15_python_module_pythons}
 | 
					
						
							| 
									
										
										
										
											2019-09-13 12:18:06 +00:00
										 |  |  | Name:           python-convertdate
 | 
					
						
							| 
									
										
										
										
											2023-05-04 19:06:28 +00:00
										 |  |  | Version:        2.4.0
 | 
					
						
							| 
									
										
										
										
											2019-09-13 12:18:06 +00:00
										 |  |  | Release:        0
 | 
					
						
							| 
									
										
										
										
											2019-09-13 13:49:32 +00:00
										 |  |  | Summary:        Module for date conversions from and to Gregorian calendar
 | 
					
						
							| 
									
										
										
										
											2019-09-13 12:18:06 +00:00
										 |  |  | License:        MIT
 | 
					
						
							|  |  |  | URL:            https://github.com/fitnr/convertdate
 | 
					
						
							| 
									
										
										
										
											2019-09-13 12:27:35 +00:00
										 |  |  | Source:         https://github.com/fitnr/convertdate/archive/v%{version}.tar.gz
 | 
					
						
							| 
									
										
										
										
											2023-05-04 19:06:28 +00:00
										 |  |  | BuildRequires:  %{python_module pip}
 | 
					
						
							|  |  |  | BuildRequires:  %{python_module wheel}
 | 
					
						
							| 
									
										
										
										
											2019-09-13 12:18:06 +00:00
										 |  |  | BuildRequires:  fdupes
 | 
					
						
							|  |  |  | BuildRequires:  python-rpm-macros
 | 
					
						
							| 
									
										
										
										
											2020-04-01 13:25:18 +00:00
										 |  |  | Requires:       python-PyMeeus >= 0.3.6
 | 
					
						
							| 
									
										
										
										
											2019-09-13 12:18:06 +00:00
										 |  |  | BuildArch:      noarch
 | 
					
						
							| 
									
										
										
										
											2025-08-12 08:17:55 +00:00
										 |  |  | %if %{with libalternatives}
 | 
					
						
							|  |  |  | BuildRequires:  alts
 | 
					
						
							|  |  |  | Requires:       alts
 | 
					
						
							|  |  |  | %else
 | 
					
						
							|  |  |  | Requires(post): update-alternatives
 | 
					
						
							|  |  |  | Requires(postun): update-alternatives
 | 
					
						
							|  |  |  | %endif
 | 
					
						
							| 
									
										
										
										
											2019-09-13 12:18:06 +00:00
										 |  |  | # SECTION test requirements
 | 
					
						
							| 
									
										
										
										
											2020-04-01 13:25:18 +00:00
										 |  |  | BuildRequires:  %{python_module PyMeeus >= 0.3.6}
 | 
					
						
							| 
									
										
										
										
											2023-05-04 19:06:28 +00:00
										 |  |  | BuildRequires:  %{python_module pytest-xdist}
 | 
					
						
							| 
									
										
											  
											
												- Update to 2.3.2:
  * Switch Persian calendar to astronomical computation (was non-canonical algorithmic method)
  * Fix inappropriate uses of trunc, which caused several errors before the Julian Day epoch (#39, #40, #42)
  * Fix bug in julian.leap (#43)
  * Add official suppport and tests for Python 3.9
  * Raise ValueError for attempted conversion of dates before the Mayan epoch
  * Fix bug in Bahai calculations during Ayyám-i-Há (#32). Thanks @chiuczek
  * Regularize variable names:
  * coptic: rename MONTH_NAMES to MONTHS, rename DAY_NAMES to WEEKDAYS
  * french_republican: add MONTHS
  * mayan: rename HAAB_MONTHS to HAAB, rename TZOLKIN_NAMES to TZOLKIN
  * Add some Jewish and Islamic holidays to holidays: shemini_azeret, lag_baomer, tu_beshvat, tisha_bav, ramadan, ashura, eid_alfitr, eid_aladha
  * Add docs. See https://convertdate.readthedocs.io/
  * Fix December 31st bug in ordinal (#34)
  * Add Indigenous Peoples' Day and Juneteenth to holidays, deprecate Columbus day
- Switch to using pytest
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-convertdate?expand=0&rev=13
											
										 
											2021-03-17 05:50:00 +00:00
										 |  |  | BuildRequires:  %{python_module pytest}
 | 
					
						
							| 
									
										
										
										
											2019-09-13 12:18:06 +00:00
										 |  |  | # /SECTION
 | 
					
						
							|  |  |  | %python_subpackages
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | %description
 | 
					
						
							| 
									
										
										
										
											2019-09-13 13:49:32 +00:00
										 |  |  | A Python module for converting between Gregorian dates and other
 | 
					
						
							|  |  |  | calendar systems. Calendars included: Baha'i, French Republican,
 | 
					
						
							|  |  |  | Hebrew, Indian Civil, Islamic, ISO, Julian, Mayan and Persian.
 | 
					
						
							| 
									
										
										
										
											2019-09-13 12:18:06 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  | %prep
 | 
					
						
							|  |  |  | %setup -q -n convertdate-%{version}
 | 
					
						
							| 
									
										
										
										
											2020-05-04 10:38:59 +00:00
										 |  |  | sed -i -e 's:, < 2020::g' setup.py
 | 
					
						
							| 
									
										
										
										
											2019-09-13 12:18:06 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  | %build
 | 
					
						
							| 
									
										
										
										
											2019-10-18 06:56:30 +00:00
										 |  |  | export LC_ALL="en_US.UTF8"
 | 
					
						
							| 
									
										
										
										
											2023-05-04 19:06:28 +00:00
										 |  |  | %pyproject_wheel
 | 
					
						
							| 
									
										
										
										
											2019-09-13 12:18:06 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  | %install
 | 
					
						
							| 
									
										
										
										
											2019-10-18 06:56:30 +00:00
										 |  |  | export LC_ALL="en_US.UTF8"
 | 
					
						
							| 
									
										
										
										
											2023-05-04 19:06:28 +00:00
										 |  |  | %pyproject_install
 | 
					
						
							| 
									
										
										
										
											2019-09-13 12:18:06 +00:00
										 |  |  | %python_expand %fdupes %{buildroot}%{$python_sitelib}
 | 
					
						
							| 
									
										
										
										
											2023-05-04 19:06:28 +00:00
										 |  |  | %python_clone -a %{buildroot}%{_bindir}/censusgeocode
 | 
					
						
							| 
									
										
										
										
											2019-09-13 12:18:06 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2019-09-13 12:27:35 +00:00
										 |  |  | %check
 | 
					
						
							| 
									
										
										
										
											2019-10-18 06:56:30 +00:00
										 |  |  | export LC_ALL="en_US.UTF8"
 | 
					
						
							| 
									
										
										
										
											2025-06-09 08:23:33 +00:00
										 |  |  | %pytest -n $(echo %{?_smp_mflags} | cut -c 3-)
 | 
					
						
							| 
									
										
										
										
											2023-05-04 19:06:28 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2025-06-25 12:06:29 +00:00
										 |  |  | %pre
 | 
					
						
							|  |  |  | %python_libalternatives_reset_alternative censusgeocode
 | 
					
						
							| 
									
										
										
										
											2019-09-13 12:27:35 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2025-08-12 08:17:55 +00:00
										 |  |  | %post
 | 
					
						
							|  |  |  | %python_install_alternative censusgeocode
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | %postun
 | 
					
						
							|  |  |  | %python_uninstall_alternative censusgeocode
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2019-09-13 12:18:06 +00:00
										 |  |  | %files %{python_files}
 | 
					
						
							| 
									
										
										
										
											2020-04-02 08:21:08 +00:00
										 |  |  | %doc README.md
 | 
					
						
							| 
									
										
										
										
											2019-09-13 12:18:06 +00:00
										 |  |  | %license LICENSE
 | 
					
						
							| 
									
										
										
										
											2023-05-04 19:06:28 +00:00
										 |  |  | %python_alternative %{_bindir}/censusgeocode
 | 
					
						
							|  |  |  | %{python_sitelib}/convertdate
 | 
					
						
							|  |  |  | %{python_sitelib}/convertdate-%{version}.dist-info
 | 
					
						
							| 
									
										
										
										
											2019-09-13 12:18:06 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  | %changelog
 |