Skip to content

Commit 778b8ed

Browse files
committed
Release v2023.9.7
1 parent 30e0fa7 commit 778b8ed

File tree

9 files changed

+276
-34
lines changed

9 files changed

+276
-34
lines changed

CHANGELOG.md

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,28 @@
1+
2023.9.7 (2023-09-07)
2+
=====================
3+
Pipenv 2023.9.7 (2023-09-07)
4+
============================
5+
6+
7+
Features & Improvements
8+
-----------------------
9+
10+
- Updates build to use exclusively ``pyproject.toml``
11+
---------------------------------------------------
12+
13+
Modernizes the build process by consolidating all of ``setuptools`` metadata within ``pyproject.toml`` and removing deprecated ``setup.cfg`` and ``setup.py``. `#5837 <https://github.com/pypa/pipenv/issues/5837>`_
14+
15+
Bug Fixes
16+
---------
17+
18+
- Restore the ignore compatibility finder pip patch to resolve issues collecting hashes from google artifact registry (and possibly others). `#5887 <https://github.com/pypa/pipenv/issues/5887>`_
19+
- Handle case better where setup.py name is referencing a variable that is a string while encouraging folks to migrate their projects to pyproject.toml `#5905 <https://github.com/pypa/pipenv/issues/5905>`_
20+
- Better handling of local file install edge cases; handle local file extras. `#5919 <https://github.com/pypa/pipenv/issues/5919>`_
21+
- Include the Pipfile markers in the install phase when using ``--skip-lock``. `#5920 <https://github.com/pypa/pipenv/issues/5920>`_
22+
- Fallback to default vcs ref when no ref is supplied.
23+
More proactively determine package name from the pip line where possible, fallback to the existing file scanning logics when unable to determine name. `#5921 <https://github.com/pypa/pipenv/issues/5921>`_
24+
25+
126
# 2023.9.1 (2023-09-01)
227

328
# Pipenv 2023.9.1 (2023-09-01)

news/5837.feature.rst

Lines changed: 0 additions & 4 deletions
This file was deleted.

news/5887.bugfix.rst

Lines changed: 0 additions & 1 deletion
This file was deleted.

news/5905.bugfix.rst

Lines changed: 0 additions & 1 deletion
This file was deleted.

news/5919.bugfix.rst

Lines changed: 0 additions & 1 deletion
This file was deleted.

news/5920.bugfix.rst

Lines changed: 0 additions & 1 deletion
This file was deleted.

news/5921.bugfix.rst

Lines changed: 0 additions & 2 deletions
This file was deleted.

pipenv/__version__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@
22
# // ) ) / / // ) ) //___) ) // ) ) || / /
33
# //___/ / / / //___/ / // // / / || / /
44
# // / / // ((____ // / / ||/ /
5-
__version__ = "2023.9.2.dev0"
5+
__version__ = "2023.9.7"

pipenv/pipenv.1

Lines changed: 250 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -27,42 +27,269 @@ level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
2727
.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
2828
.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
2929
..
30-
.TH "PIPENV" "1" "Feb 18, 2023" "2023.2.18" "pipenv"
30+
.TH "PIPENV" "1" "Sep 07, 2023" "2023.9.7" "pipenv"
3131
.sp
32-
Pipenv uses a set of commands to manage your Project\(aqs dependencies and custom scripts.
33-
It replaces the use of \fBMakefile\fP, direct calls to \fBpip\fP and \fBpython \-m venv\fP or \fBvirtualenv\fP\&.
34-
to create virtual environments and install packages in them.
35-
Pipenv uses two files to do this: \fBPipfile\fP and \fBPipfile.lock\fP (which will look familiar if you
36-
are used to packages manager like \fByarn\fP or \fBnpm\fP).
32+
\fBNOTE:\fP
33+
.INDENT 0.0
34+
.INDENT 3.5
35+
This guide is written for Python 3.7+
36+
.UNINDENT
37+
.UNINDENT
38+
.SH MAKE SURE YOU HAVE PYTHON AND PIP
3739
.sp
38-
The main commands are:
40+
Before you go any further, make sure you have Python and that it’s available
41+
from your command line. You can check this by simply running
3942
.INDENT 0.0
40-
.IP \(bu 2
41-
\fBinstall\fP \-
43+
.INDENT 3.5
4244
.sp
43-
Will create a virtual env and install dependencies (if it does not exist already)
44-
The dependencies will be installed inside.
45-
.IP \(bu 2
46-
\fBinstall package==0.2\fP \-
45+
.nf
46+
.ft C
47+
$ python \-\-version
48+
49+
.ft P
50+
.fi
51+
.UNINDENT
52+
.UNINDENT
4753
.sp
48-
Will add the package in version 0.2 to the virtual environment and
49-
to \fBPipfile\fP and \fBPipfile.lock\fP
50-
.IP \(bu 2
51-
\fBuninstall\fP \- Will remove the dependency
54+
You should get some output like \fB3.10.8\fP\&. If you do not have Python, please
55+
install the latest 3.x version from \fI\%python.org\fP
56+
.sp
57+
Additionally, make sure you have \fI\%pip\fP available.
58+
Check this by running
59+
.INDENT 0.0
60+
.INDENT 3.5
61+
.sp
62+
.nf
63+
.ft C
64+
$ pip \-\-version
65+
pip 22.3.1
66+
67+
.ft P
68+
.fi
69+
.UNINDENT
70+
.UNINDENT
71+
.sp
72+
If you installed Python from source, with an installer from \fI\%python.org\fP or via \fI\%Homebrew\fP, you likely already have pip.
73+
If you’re on Linux and installed using your OS package manager, you may have to \fI\%install pip\fP manually.
74+
.SH INSTALLING PIPENV
75+
.SS Preferred Installation of Pipenv
76+
.sp
77+
It is recommended that users on most platforms install pipenv from \fI\%pypi.org\fP using
78+
.INDENT 0.0
79+
.INDENT 3.5
80+
.sp
81+
.nf
82+
.ft C
83+
$ pip install pipenv \-\-user
84+
85+
.ft P
86+
.fi
87+
.UNINDENT
88+
.UNINDENT
89+
.sp
90+
\fBNOTE:\fP
91+
.INDENT 0.0
92+
.INDENT 3.5
93+
pip \fI\%user installations\fP allow for installation into your home directory to prevent breaking any system\-wide packages.
94+
Due to interaction between dependencies, you should limit tools installed in this way to basic building blocks for a Python workflow such as virtualenv, pipenv, tox, and similar software.
95+
.UNINDENT
96+
.UNINDENT
97+
.sp
98+
If \fBpipenv\fP isn’t available in your shell after installation,
99+
you’ll need to add the user site\-packages binary directory to your \fBPATH\fP\&.
100+
.sp
101+
On Linux and macOS you can find the \fI\%user base\fP binary directory by running
102+
\fBpython \-m site \-\-user\-base\fP and appending \fBbin\fP to the end. For example,
103+
this will typically print \fB~/.local\fP (with \fB~\fP expanded to the
104+
absolute path to your home directory), so you’ll need to add
105+
\fB~/.local/bin\fP to your \fBPATH\fP\&. You can set your \fBPATH\fP permanently by
106+
\fI\%modifying ~/.profile\fP\&.
107+
.sp
108+
On Windows you can find the user base binary directory by running
109+
\fBpython \-m site \-\-user\-site\fP and replacing \fBsite\-packages\fP with
110+
\fBScripts\fP\&. For example, this could return
111+
\fBC:\eUsers\eUsername\eAppData\eRoaming\ePython37\esite\-packages\fP, so you would
112+
need to set your \fBPATH\fP to include
113+
\fBC:\eUsers\eUsername\eAppData\eRoaming\ePython37\eScripts\fP\&. You can set your
114+
user \fBPATH\fP permanently in the \fI\%Control Panel\fP\&.
115+
.sp
116+
You may need to log out for the \fBPATH\fP changes to take effect.
117+
.sp
118+
To upgrade pipenv at any time:
119+
.INDENT 0.0
120+
.INDENT 3.5
121+
.sp
122+
.nf
123+
.ft C
124+
$ pip install \-\-user \-\-upgrade pipenv
125+
126+
.ft P
127+
.fi
128+
.UNINDENT
129+
.UNINDENT
130+
.SS Homebrew Installation of Pipenv
131+
.INDENT 0.0
52132
.IP \(bu 2
53-
\fBlock\fP \- Regenerate \fBPipfile.lock\fP and updates the dependencies inside it.
133+
\fI\%Homebrew\fP is a popular open\-source package management system for macOS (or Linux).
134+
.UNINDENT
135+
.sp
136+
Once you have installed Homebrew simply run
137+
.INDENT 0.0
138+
.INDENT 3.5
139+
.sp
140+
.nf
141+
.ft C
142+
$ brew install pipenv
143+
144+
.ft P
145+
.fi
146+
.UNINDENT
54147
.UNINDENT
55148
.sp
56-
These are intended to replace \fB$ pip install\fP usage, as well as manual virtualenv management.
149+
To upgrade pipenv at any time:
57150
.INDENT 0.0
151+
.INDENT 3.5
152+
.sp
153+
.nf
154+
.ft C
155+
$ brew upgrade pipenv
156+
157+
.ft P
158+
.fi
159+
.UNINDENT
160+
.UNINDENT
161+
.sp
162+
\fBNOTE:\fP
163+
.INDENT 0.0
164+
.INDENT 3.5
165+
Homebrew installation is discouraged because it works better to install pipenv using pip on macOS.
166+
.UNINDENT
167+
.UNINDENT
168+
.SH INSTALLING PACKAGES FOR YOUR PROJECT
169+
.sp
170+
Pipenv manages dependencies on a per\-project basis. To install a package,
171+
change into your project’s directory (or just an empty directory for this
172+
tutorial) and run
173+
.INDENT 0.0
174+
.INDENT 3.5
175+
.sp
176+
.nf
177+
.ft C
178+
$ cd myproject
179+
$ pipenv install <package>
180+
181+
.ft P
182+
.fi
183+
.UNINDENT
184+
.UNINDENT
185+
.sp
186+
\fBNOTE:\fP
187+
.INDENT 0.0
188+
.INDENT 3.5
189+
Pipenv is designed to be used by non\-privileged OS users. It is not meant
190+
to install or handle packages for the whole OS. Running Pipenv as \fBroot\fP
191+
or with \fBsudo\fP (or \fBAdmin\fP on Windows) is highly discouraged and might
192+
lead to unintend breakage of your OS.
193+
.UNINDENT
194+
.UNINDENT
195+
.sp
196+
Pipenv will install the package and create a \fBPipfile\fP
197+
for you in your project’s directory. The \fBPipfile\fP is used to track which
198+
dependencies your project needs in case you need to re\-install them, such as
199+
when you share your project with others.
200+
.sp
201+
For example when installing the \fBrequests\fP library, you should get output similar to this:
202+
.INDENT 0.0
203+
.INDENT 3.5
204+
.sp
205+
.nf
206+
.ft C
207+
$ pipenv install requests
208+
Creating a virtualenv for this project...
209+
Pipfile: C:\eUsers\ematte\eProjects\epipenv\-triage\eexample\ePipfile
210+
Using C:/Users/matte/AppData/Local/Programs/Python/Python311/python.exe (3.11.2) to create virtualenv...
211+
[ ] Creating virtual environment...created virtual environment CPython3.11.2.final.0\-64 in 488ms
212+
creator CPython3Windows(dest=C:\eUsers\ematte\e.virtualenvs\eexample\-7V6BFyzL, clear=False, no_vcs_ignore=False, global=False)
213+
seeder FromAppData(download=False, pip=bundle, setuptools=bundle, wheel=bundle, via=copy, app_data_dir=C:\eUsers\ematte\eAppData\eLocal\epypa\evirtualenv)
214+
added seed packages: pip==23.0, setuptools==67.1.0, wheel==0.38.4
215+
activators BashActivator,BatchActivator,FishActivator,NushellActivator,PowerShellActivator,PythonActivator
216+
217+
Successfully created virtual environment!
218+
Virtualenv location: C:\eUsers\ematte\e.virtualenvs\eexample\-7V6BFyzL
219+
Installing requests...
220+
Resolving requests...
221+
Installing...
222+
Adding requests to Pipfile\(aqs [packages] ...
223+
Installation Succeeded
224+
Installing dependencies from Pipfile.lock (3b5a71)...
225+
To activate this project\(aqs virtualenv, run pipenv shell.
226+
Alternatively, run a command inside the virtualenv with pipenv run.
227+
228+
.ft P
229+
.fi
230+
.UNINDENT
231+
.UNINDENT
232+
.SH USING INSTALLED PACKAGES
233+
.sp
234+
Now that \fBrequests\fP is installed you can create a simple \fBmain.py\fP file to use it:
235+
.INDENT 0.0
236+
.INDENT 3.5
237+
.sp
238+
.nf
239+
.ft C
240+
import requests
241+
242+
response = requests.get(\(aqhttps://httpbin.org/ip\(aq)
243+
print(\(aqYour IP is {0}\(aq.format(response.json()[\(aqorigin\(aq]))
244+
245+
.ft P
246+
.fi
247+
.UNINDENT
248+
.UNINDENT
249+
.sp
250+
Then you can run this script using \fBpipenv run\fP
251+
.INDENT 0.0
252+
.INDENT 3.5
253+
.sp
254+
.nf
255+
.ft C
256+
$ pipenv run python main.py
257+
258+
.ft P
259+
.fi
260+
.UNINDENT
261+
.UNINDENT
262+
.sp
263+
You should get output similar to this:
264+
.INDENT 0.0
265+
.INDENT 3.5
266+
.sp
267+
.nf
268+
.ft C
269+
Your IP is 8.8.8.8
270+
271+
.ft P
272+
.fi
273+
.UNINDENT
274+
.UNINDENT
275+
.sp
276+
Using \fB$ pipenv run\fP ensures that your installed packages are available to
277+
your script by activating the virtualenv. It is also possible to spawn a new shell
278+
that ensures all commands have access to your installed packages with \fB$ pipenv shell\fP\&.
279+
.SH VIRTUALENV MAPPING CAVEAT
280+
.INDENT 0.0
281+
.IP \(bu 2
282+
Pipenv automatically maps projects to their specific virtualenvs.
283+
.IP \(bu 2
284+
By default, the virtualenv is stored globally with the name of the project’s root directory plus the hash of the full path to the project’s root (e.g., \fBmy_project\-a3de50\fP).
58285
.IP \(bu 2
59-
\fBgraph\fP will show you a dependency graph of your installed dependencies.
286+
Should you change your project’s path, you break such a default mapping and pipenv will no longer be able to find and to use the project’s virtualenv.
60287
.IP \(bu 2
61-
\fBshell\fP will spawn a shell with the virtualenv activated. This shell can be deactivated by using \fBexit\fP\&.
288+
If you must move or rename a directory managed by pipenv, run ‘pipenv \-\-rm’ before renaming or moving your project directory. Then, after renaming or moving the directory run ‘pipenv install’ to recreate the virtualenv.
62289
.IP \(bu 2
63-
\fBrun\fP will run a given command from the virtualenv, with any arguments forwarded (e.g. \fB$ pipenv run python\fP or \fB$ pipenv run pip freeze\fP).
290+
Customize this behavior with \fBPIPENV_CUSTOM_VENV_NAME\fP environment variable.
64291
.IP \(bu 2
65-
\fBcheck\fP checks for security vulnerabilities and asserts that \fI\%PEP 508\fP requirements are being met by the current environment.
292+
You might also prefer to set \fBPIPENV_VENV_IN_PROJECT=1\fP in your .env or .bashrc/.zshrc (or other shell configuration file) for creating the virtualenv inside your project’s directory.
66293
.UNINDENT
67294
.SH AUTHOR
68295
Python Packaging Authority

0 commit comments

Comments
 (0)