File tree Expand file tree Collapse file tree 3 files changed +16
-29
lines changed
Expand file tree Collapse file tree 3 files changed +16
-29
lines changed Original file line number Diff line number Diff line change 1- # =============================================================================
2- # DEPRECATION WARNING:
3- #
4- # The file `requirements.txt` does not influence the package dependencies and
5- # will not be automatically created in the next version of PyScaffold (v4.x).
6- #
7- # Please have look at the docs for better alternatives
8- # (`Dependency Management` section).
9- # =============================================================================
10- #
11- # Add your pinned requirements so that they can be easily installed with:
12- # pip install -r requirements.txt
13- # Remember to also add them in setup.cfg but unpinned.
14- # Example:
15- # numpy==1.13.3
16- # scipy==1.0
17-
18- urwid == 2.0.1
1+ urwid == 2.1.2
Original file line number Diff line number Diff line change @@ -28,8 +28,9 @@ package_dir =
2828 =src
2929# DON'T CHANGE THE FOLLOWING LINE! IT WILL BE UPDATED BY PYSCAFFOLD!
3030setup_requires = pyscaffold>=3.1a0,<3.2a0
31- # Add here dependencies of your project (semicolon/line-separated), e.g.
32- install_requires = urwid
31+ # Add here dependencies of your project (semicolon/line-separated)
32+ install_requires =
33+ urwid ==2.1.2
3334# The usage of test_requires is discouraged, see `Dependency Management` docs
3435# tests_require = pytest; pytest-cov
3536# Require a specific Python version, e.g. Python 2.7 or >= 3.4
Original file line number Diff line number Diff line change 11# -*- coding: utf-8 -*-
2- from pkg_resources import get_distribution , DistributionNotFound
3-
42try :
5- # Change here if project is renamed and does not equal the package name
6- dist_name = __name__
7- __version__ = get_distribution (dist_name ).version
8- except DistributionNotFound :
9- __version__ = 'unknown'
10- finally :
11- del get_distribution , DistributionNotFound
3+ from importlib .metadata import version , PackageNotFoundError
4+ try :
5+ __version__ = version ("redial" )
6+ except PackageNotFoundError :
7+ __version__ = 'unknown'
8+ except ImportError :
9+ # Fallback for Python < 3.8
10+ from pkg_resources import get_distribution , DistributionNotFound
11+ try :
12+ __version__ = get_distribution ("redial" ).version
13+ except DistributionNotFound :
14+ __version__ = 'unknown'
You can’t perform that action at this time.
0 commit comments