Pints are based on 1/8 of a gallon, but the definition of gallon varies. The liquid pint (think beer) is based on the British Wine Gallon which was established in 1707 and is equal to 231 cubic inches. A dry pint is based on the British Corn Gallon which is 269 cubic inches.
Since 1824, the UK (and other parts of the world), have used the imperial gallon to define a pint. Pints in the UK are still based on 1/8 gallon, but a gallon is defined as 10 lbs of water which is about 277 cubic inches. This means that a pint is equal to 20 ounces. That’s 25% more beer than a pint in the US!